summaryrefslogtreecommitdiffstats
path: root/net/sched/act_nat.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-08-02 14:23:38 +0300
committerTony Lindgren <tony@atomide.com>2010-08-02 14:23:38 +0300
commit055a1b8c9927bc587f293020a54c6cd8e24dfac0 (patch)
treedb7c8d00931180c4896c9e00d2cb506939592cda /net/sched/act_nat.c
parent8a6f7e14fc3b3ea911838c3f4ce137cb8a3d134a (diff)
parentf535daed925c2d3c1db06b06a63c4955f2c51988 (diff)
downloadop-kernel-dev-055a1b8c9927bc587f293020a54c6cd8e24dfac0.zip
op-kernel-dev-055a1b8c9927bc587f293020a54c6cd8e24dfac0.tar.gz
Merge branch 'devel-misc' into omap-for-linus
Diffstat (limited to 'net/sched/act_nat.c')
-rw-r--r--net/sched/act_nat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 5709494..724553e 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -205,7 +205,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
{
struct icmphdr *icmph;
- if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
+ if (!pskb_may_pull(skb, ihl + sizeof(*icmph)))
goto drop;
icmph = (void *)(skb_network_header(skb) + ihl);
@@ -215,6 +215,9 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
(icmph->type != ICMP_PARAMETERPROB))
break;
+ if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
+ goto drop;
+
iph = (void *)(icmph + 1);
if (egress)
addr = iph->daddr;
OpenPOWER on IntegriCloud