Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25915
b: refs/heads/master
c: ec67009
h: refs/heads/master
i:
  25913: 404f7da
  25911: 34a4bd3
v: v3
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Apr 18, 2006
1 parent b40e09b commit 1faa586
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef5cb9738b488140eb6c3f32fffab08f39a4905e
refs/heads/master: ec6700958a776a83681ecb11239c0525730c42ba
12 changes: 12 additions & 0 deletions trunk/net/ipv6/exthdrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,18 @@ int ipv6_parse_hopopts(struct sk_buff *skb, int nhoff)
{
struct inet6_skb_parm *opt = IP6CB(skb);

/*
* skb->nh.raw is equal to skb->data, and
* skb->h.raw - skb->nh.raw is always equal to
* sizeof(struct ipv6hdr) by definition of
* hop-by-hop options.
*/
if (!pskb_may_pull(skb, sizeof(struct ipv6hdr) + 8) ||
!pskb_may_pull(skb, sizeof(struct ipv6hdr) + ((skb->h.raw[1] + 1) << 3))) {
kfree_skb(skb);
return -1;
}

opt->hop = sizeof(struct ipv6hdr);
if (ip6_parse_tlv(tlvprochopopt_lst, skb)) {
skb->h.raw += (skb->h.raw[1]+1)<<3;
Expand Down

0 comments on commit 1faa586

Please sign in to comment.