]> git.baikalelectronics.ru Git - kernel.git/commit
vxlan: set needed headroom correctly
authorJiri Benc <jbenc@redhat.com>
Thu, 17 Sep 2015 14:11:10 +0000 (16:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Sep 2015 05:32:15 +0000 (22:32 -0700)
commit5eb8f27a23377aba0aaa80339ef0f9b739c278f6
treee487f939350690a11d37b015efc9118a15cc9413
parent4970e4d46764a49130af468c88edf968f4f8b24b
vxlan: set needed headroom correctly

vxlan_setup is called when allocating the net_device, i.e. way before
vxlan_newlink (or vxlan_dev_configure) is called. This means
vxlan->default_dst is actually unset in vxlan_setup and the condition that
sets needed_headroom always takes the else branch.

Set the needed_headrom at the point when we have the information about
the address family available.

Fixes: d2177b1af817f ("vxlan: add ipv6 support")
Fixes: 54c2b65009782 ("vxlan: use dev->needed_headroom instead of dev->hard_header_len")
CC: Cong Wang <cwang@twopensource.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c