diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2011-11-17 21:20:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-18 14:37:10 -0500 |
commit | 805dc1d60fb0d4a8b7730748a11dc2688b8f6cf6 (patch) | |
tree | c6a51b8945e91012802082264e4fc59635349110 /net/ipv4/ip_gre.c | |
parent | 4ce4091256d61f8e9c7296f6643c8bd5bb2a00e5 (diff) |
ip_gre: Set needed_headroom dynamically again
ip_gre: Set needed_headroom dynamically again
Now that all needed_headroom users have been fixed up so that
we can safely increase needed_headroom, this patch restore the
dynamic update of needed_headroom.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 38f7c07d12ab..2b32296b7958 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -835,6 +835,8 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev | |||
835 | if (skb_headroom(skb) < max_headroom || skb_shared(skb)|| | 835 | if (skb_headroom(skb) < max_headroom || skb_shared(skb)|| |
836 | (skb_cloned(skb) && !skb_clone_writable(skb, 0))) { | 836 | (skb_cloned(skb) && !skb_clone_writable(skb, 0))) { |
837 | struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom); | 837 | struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom); |
838 | if (max_headroom > dev->needed_headroom) | ||
839 | dev->needed_headroom = max_headroom; | ||
838 | if (!new_skb) { | 840 | if (!new_skb) { |
839 | ip_rt_put(rt); | 841 | ip_rt_put(rt); |
840 | dev->stats.tx_dropped++; | 842 | dev->stats.tx_dropped++; |