This fixes various issues with vxlan related to IPv6.
Jiri Benc (5):
vxlan: set needed headroom correctly
vxlan: reject IPv6 addresses if IPv6 is not configured
qlcnic: track vxlan port count
be2net: allow offloading with the same port for IPv4 and IPv6
bnx2x: track vxlan port count
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 14 ++++++++++++--
drivers/net/ethernet/emulex/benet/be.h | 1 +
drivers/net/ethernet/emulex/benet/be_main.c | 10 ++++++++++
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 +
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 18 +++++++++++++-----
drivers/net/vxlan.c | 15 +++++++++------
7 files changed, 47 insertions(+), 13 deletions(-)
--
1.8.3.1
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 <redacted>
Signed-off-by: Jiri Benc <redacted>
---
drivers/net/vxlan.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
When IPv6 address is set without IPv6 configured, the vxlan socket is mostly
treated as an IPv4 one but various lookus in fdb etc. still take the
AF_INET6 into account. This creates incosistencies with weird consequences.
Just reject IPv6 addresses in such case.
Signed-off-by: Jiri Benc <redacted>
---
drivers/net/vxlan.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
The callback for adding vxlan port can be called with the same port for
both IPv4 and IPv6. Do not disable the offloading when the same port for
both protocols is added and later one of them removed.
Signed-off-by: Jiri Benc <redacted>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 +
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 18 +++++++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
@@ -483,11 +483,17 @@ static void qlcnic_add_vxlan_port(struct net_device *netdev,/* Adapter supports only one VXLAN port. Use very first port*forenablingoffload*/-if(!qlcnic_encap_rx_offload(adapter)||ahw->vxlan_port)+if(!qlcnic_encap_rx_offload(adapter))return;+if(!ahw->vxlan_port_count){+ahw->vxlan_port_count=1;+ahw->vxlan_port=ntohs(port);+adapter->flags|=QLCNIC_ADD_VXLAN_PORT;+return;+}+if(ahw->vxlan_port==ntohs(port))+ahw->vxlan_port_count++;-ahw->vxlan_port=ntohs(port);-adapter->flags|=QLCNIC_ADD_VXLAN_PORT;}staticvoidqlcnic_del_vxlan_port(structnet_device*netdev,
The callback for adding vxlan port can be called with the same port for both
IPv4 and IPv6. Do not disable the offloading if this occurs.
Signed-off-by: Jiri Benc <redacted>
---
drivers/net/ethernet/emulex/benet/be.h | 1 +
drivers/net/ethernet/emulex/benet/be_main.c | 10 ++++++++++
2 files changed, 11 insertions(+)
The callback for adding vxlan port can be called with the same port for
both IPv4 and IPv6. Do not disable the offloading when the same port for
both protocols is added and later one of them removed.
Signed-off-by: Jiri Benc <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 14 ++++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
On Thu, Sep 17, 2015 at 7:41 PM, Jiri Benc [off-list ref] wrote:
The callback for adding vxlan port can be called with the same port for both
IPv4 and IPv6. Do not disable the offloading if this occurs.
Signed-off-by: Jiri Benc <redacted>
---
drivers/net/ethernet/emulex/benet/be.h | 1 +
drivers/net/ethernet/emulex/benet/be_main.c | 10 ++++++++++
2 files changed, 11 insertions(+)