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)
commit9dc2ad1008c9f91f55ec6c89ec0f8639dfc91596
treee487f939350690a11d37b015efc9118a15cc9413
parentc38f6ac74c99801360705d97244ff222ae18dc97
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: e4c7ed415387c ("vxlan: add ipv6 support")
Fixes: 2853af6a2ea1a ("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