diff options
author | Jesse Gross <jesse@nicira.com> | 2011-11-30 20:05:51 -0500 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2011-12-03 12:35:10 -0500 |
commit | 75f2811c6460ccc59d83c66059943ce9c9f81a18 (patch) | |
tree | 49373cf5f5b11358aeb587209ad270496f751609 /net/bridge/br_multicast.c | |
parent | 396cf9430505cfba529a2f2a037d782719fa5844 (diff) |
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>
Diffstat (limited to 'net/bridge/br_multicast.c')
-rw-r--r-- | net/bridge/br_multicast.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 7743e0d109ea..375417e633c9 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -1458,6 +1458,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br, | |||
1458 | const struct ipv6hdr *ip6h; | 1458 | const struct ipv6hdr *ip6h; |
1459 | u8 icmp6_type; | 1459 | u8 icmp6_type; |
1460 | u8 nexthdr; | 1460 | u8 nexthdr; |
1461 | __be16 frag_off; | ||
1461 | unsigned len; | 1462 | unsigned len; |
1462 | int offset; | 1463 | int offset; |
1463 | int err; | 1464 | int err; |
@@ -1483,7 +1484,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br, | |||
1483 | return -EINVAL; | 1484 | return -EINVAL; |
1484 | 1485 | ||
1485 | nexthdr = ip6h->nexthdr; | 1486 | nexthdr = ip6h->nexthdr; |
1486 | offset = ipv6_skip_exthdr(skb, sizeof(*ip6h), &nexthdr); | 1487 | offset = ipv6_skip_exthdr(skb, sizeof(*ip6h), &nexthdr, &frag_off); |
1487 | 1488 | ||
1488 | if (offset < 0 || nexthdr != IPPROTO_ICMPV6) | 1489 | if (offset < 0 || nexthdr != IPPROTO_ICMPV6) |
1489 | return 0; | 1490 | return 0; |