diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-03-18 00:27:27 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-21 14:32:36 -0700 |
commit | 01b7e60bf848901c3a95794c90888e4e33ab751f (patch) | |
tree | 8c5fbbdeb5269cfb04ed74968b2fbd81befda7d9 | |
parent | e5a1f3787f4b43e828de2818faa6a0f658b87a63 (diff) |
vlan: should take into account needed_headroom
[ Upstream commit d870bfb9d366c5d466c0f5419a4ec95a3f71ea8a ]
Commit c95b819ad7 (gre: Use needed_headroom)
made gre use needed_headroom instead of hard_header_len
This uncover a bug in vlan code.
We should make sure vlan devices take into account their
real_dev->needed_headroom or we risk a crash in ipgre_header(), because
we dont have enough room to push IP header in skb.
Reported-by: Diddi Oscarsson <diddi@diddi.se>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | net/8021q/vlan_dev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index be737539f34d..ed68d0722e53 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -707,6 +707,7 @@ static int vlan_dev_init(struct net_device *dev) dev->fcoe_ddp_xid = real_dev->fcoe_ddp_xid; #endif + dev->needed_headroom = real_dev->needed_headroom; if (real_dev->features & NETIF_F_HW_VLAN_TX) { dev->header_ops = real_dev->header_ops; dev->hard_header_len = real_dev->hard_header_len; |