Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327779
b: refs/heads/master
c: 0ad352c
h: refs/heads/master
i:
  327777: 1e07dd9
  327775: d0f1f8b
v: v3
  • Loading branch information
Patrick McHardy authored and Pablo Neira Ayuso committed Aug 30, 2012
1 parent a4b4341 commit bae3b22
Show file tree
Hide file tree
Showing 2 changed files with 9 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: c7232c9979cba684c50b64c513c4a83c9aa70563
refs/heads/master: 0ad352cb433ed2b05921a32b5ee20410512e2320
8 changes: 8 additions & 0 deletions trunk/net/ipv6/netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ int ip6_route_me_harder(struct sk_buff *skb)
{
struct net *net = dev_net(skb_dst(skb)->dev);
const struct ipv6hdr *iph = ipv6_hdr(skb);
unsigned int hh_len;
struct dst_entry *dst;
struct flowi6 fl6 = {
.flowi6_oif = skb->sk ? skb->sk->sk_bound_dev_if : 0,
Expand Down Expand Up @@ -47,6 +48,13 @@ int ip6_route_me_harder(struct sk_buff *skb)
}
#endif

/* Change in oif may mean change in hh_len. */
hh_len = skb_dst(skb)->dev->hard_header_len;
if (skb_headroom(skb) < hh_len &&
pskb_expand_head(skb, HH_DATA_ALIGN(hh_len - skb_headroom(skb)),
0, GFP_ATOMIC))
return -1;

return 0;
}
EXPORT_SYMBOL(ip6_route_me_harder);
Expand Down

0 comments on commit bae3b22

Please sign in to comment.