vxlan: use dev->needed_headroom instead of dev->hard_header_len
authorCong Wang <cwang@twopensource.com>
Thu, 12 Jun 2014 18:53:10 +0000 (11:53 -0700)
committerJiri Slaby <jslaby@suse.cz>
Mon, 23 Jun 2014 08:28:05 +0000 (10:28 +0200)
commit0067390aaa904826fbc3fa4b0ee2bcd01ac3b7e9
treeda514e2a0fbd84b080975ae94a5b60cee78824de
parent76acb94289d2ca897bd820b9627f4ade15230663
vxlan: use dev->needed_headroom instead of dev->hard_header_len

[ Upstream commit 2853af6a2ea1a8ed09b09dd4fb578e7f435e8d34 ]

When we mirror packets from a vxlan tunnel to other device,
the mirror device should see the same packets (that is, without
outer header). Because vxlan tunnel sets dev->hard_header_len,
tcf_mirred() resets mac header back to outer mac, the mirror device
actually sees packets with outer headers

Vxlan tunnel should set dev->needed_headroom instead of
dev->hard_header_len, like what other ip tunnels do. This fixes
the above problem.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: stephen hemminger <stephen@networkplumber.org>
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/vxlan.c