Commit 8cf22943 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[ICMP]: Restore pskb_pull calls in receive function

Somewhere along the development of my ICMP relookup patch the header
length check went AWOL on the non-IPsec path.  This patch restores the
check.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d8c0aa9
...@@ -1015,7 +1015,8 @@ int icmp_rcv(struct sk_buff *skb) ...@@ -1015,7 +1015,8 @@ int icmp_rcv(struct sk_buff *skb)
goto error; goto error;
} }
__skb_pull(skb, sizeof(*icmph)); if (!pskb_pull(skb, sizeof(*icmph)))
goto error;
icmph = icmp_hdr(skb); icmph = icmp_hdr(skb);
......
...@@ -683,7 +683,8 @@ static int icmpv6_rcv(struct sk_buff *skb) ...@@ -683,7 +683,8 @@ static int icmpv6_rcv(struct sk_buff *skb)
} }
} }
__skb_pull(skb, sizeof(*hdr)); if (!pskb_pull(skb, sizeof(*hdr)))
goto discard_it;
hdr = icmp6_hdr(skb); hdr = icmp6_hdr(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment