projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d1d1d3
)
act_nat: fix wild pointer
author
Changli Gao
<xiaosuo@gmail.com>
Thu, 29 Jul 2010 13:41:46 +0000
(13:41 +0000)
committer
David S. Miller
<davem@davemloft.net>
Sun, 1 Aug 2010 05:04:54 +0000
(22:04 -0700)
pskb_may_pull() may change skb pointers, so adjust icmph after pskb_may_pull().
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_nat.c
patch
|
blob
|
history
diff --git
a/net/sched/act_nat.c
b/net/sched/act_nat.c
index 724553e8ed7bc9d8ecd668c71ab9373936a3d2d3..ea008f57fc830d4d667753267f02487d3943354b 100644
(file)
--- a/
net/sched/act_nat.c
+++ b/
net/sched/act_nat.c
@@
-218,6
+218,7
@@
static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
goto drop;
+ icmph = (void *)(skb_network_header(skb) + ihl);
iph = (void *)(icmph + 1);
if (egress)
addr = iph->daddr;