vlan: should take into account needed_headroom
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 18 Mar 2011 00:27:27 +0000 (00:27 +0000)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:42:01 +0000 (11:42 -0700)
commit8507e61aa8116620bfad952b2a61d18a9d4eb5b9
treeafea5aff7549aa26f456937ff594db012aec9f81
parent118946e4c05328b8fef6f7b16805314af131f6b3
vlan: should take into account needed_headroom

BugLink: http://bugs.launchpad.net/bugs/769042

[ 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>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
net/8021q/vlan_dev.c