ipv6: Add fragment reporting to ipv6_skip_exthdr().
While parsing through IPv6 extension headers, fragment headers are skipped making them invisible to the caller. This reports the fragment offset of the last header in order to make it possible to determine whether the packet is fragmented and, if so whether it is a first or last fragment. Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
@ -329,10 +329,11 @@ static int ip6_forward_proxy_check(struct sk_buff *skb)
|
||||
{
|
||||
struct ipv6hdr *hdr = ipv6_hdr(skb);
|
||||
u8 nexthdr = hdr->nexthdr;
|
||||
__be16 frag_off;
|
||||
int offset;
|
||||
|
||||
if (ipv6_ext_hdr(nexthdr)) {
|
||||
offset = ipv6_skip_exthdr(skb, sizeof(*hdr), &nexthdr);
|
||||
offset = ipv6_skip_exthdr(skb, sizeof(*hdr), &nexthdr, &frag_off);
|
||||
if (offset < 0)
|
||||
return 0;
|
||||
} else
|
||||
|
Reference in New Issue
Block a user