diff options
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 9e2bdccf9143..01d46bff63c3 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -135,11 +135,12 @@ static int is_ineligible(struct sk_buff *skb) | |||
135 | int ptr = (u8 *)(ipv6_hdr(skb) + 1) - skb->data; | 135 | int ptr = (u8 *)(ipv6_hdr(skb) + 1) - skb->data; |
136 | int len = skb->len - ptr; | 136 | int len = skb->len - ptr; |
137 | __u8 nexthdr = ipv6_hdr(skb)->nexthdr; | 137 | __u8 nexthdr = ipv6_hdr(skb)->nexthdr; |
138 | __be16 frag_off; | ||
138 | 139 | ||
139 | if (len < 0) | 140 | if (len < 0) |
140 | return 1; | 141 | return 1; |
141 | 142 | ||
142 | ptr = ipv6_skip_exthdr(skb, ptr, &nexthdr); | 143 | ptr = ipv6_skip_exthdr(skb, ptr, &nexthdr, &frag_off); |
143 | if (ptr < 0) | 144 | if (ptr < 0) |
144 | return 0; | 145 | return 0; |
145 | if (nexthdr == IPPROTO_ICMPV6) { | 146 | if (nexthdr == IPPROTO_ICMPV6) { |
@@ -596,6 +597,7 @@ static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info) | |||
596 | int inner_offset; | 597 | int inner_offset; |
597 | int hash; | 598 | int hash; |
598 | u8 nexthdr; | 599 | u8 nexthdr; |
600 | __be16 frag_off; | ||
599 | 601 | ||
600 | if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) | 602 | if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) |
601 | return; | 603 | return; |
@@ -603,7 +605,8 @@ static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info) | |||
603 | nexthdr = ((struct ipv6hdr *)skb->data)->nexthdr; | 605 | nexthdr = ((struct ipv6hdr *)skb->data)->nexthdr; |
604 | if (ipv6_ext_hdr(nexthdr)) { | 606 | if (ipv6_ext_hdr(nexthdr)) { |
605 | /* now skip over extension headers */ | 607 | /* now skip over extension headers */ |
606 | inner_offset = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr); | 608 | inner_offset = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), |
609 | &nexthdr, &frag_off); | ||
607 | if (inner_offset<0) | 610 | if (inner_offset<0) |
608 | return; | 611 | return; |
609 | } else { | 612 | } else { |