Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15232
b: refs/heads/master
c: b036648
h: refs/heads/master
v: v3
  • Loading branch information
Bart De Schuymer authored and David S. Miller committed Dec 19, 2005
1 parent 2b27ce5 commit 8918ec8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b80ebedbee87c5b2213fc3635bf0bd7450bce30
refs/heads/master: b03664869aa6f84c3c98a06ac9d6905b195909bc
17 changes: 7 additions & 10 deletions trunk/net/bridge/br_netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static int check_hbh_len(struct sk_buff *skb)
len -= 2;

while (len > 0) {
int optlen = raw[off+1]+2;
int optlen = skb->nh.raw[off+1]+2;

switch (skb->nh.raw[off]) {
case IPV6_TLV_PAD0:
Expand All @@ -308,18 +308,15 @@ static int check_hbh_len(struct sk_buff *skb)
case IPV6_TLV_JUMBO:
if (skb->nh.raw[off+1] != 4 || (off&3) != 2)
goto bad;

pkt_len = ntohl(*(u32*)(skb->nh.raw+off+2));

if (pkt_len <= IPV6_MAXPLEN ||
skb->nh.ipv6h->payload_len)
goto bad;
if (pkt_len > skb->len - sizeof(struct ipv6hdr))
goto bad;
if (pkt_len + sizeof(struct ipv6hdr) < skb->len) {
if (__pskb_trim(skb,
pkt_len + sizeof(struct ipv6hdr)))
goto bad;
if (skb->ip_summed == CHECKSUM_HW)
skb->ip_summed = CHECKSUM_NONE;
}
if (pskb_trim_rcsum(skb,
pkt_len+sizeof(struct ipv6hdr)))
goto bad;
break;
default:
if (optlen > len)
Expand Down

0 comments on commit 8918ec8

Please sign in to comment.