* Fw: [Bug 203533] New: VxLAN: Cannot create multiple vxlan devices for a given VNI and different source addresses.
@ 2019-05-07 15:08 Stephen Hemminger
0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2019-05-07 15:08 UTC (permalink / raw)
To: netdev
This is a valid request, not sure if just changing the check is enough
because it also matters where packets match endpoints.
Begin forwarded message:
Date: Mon, 06 May 2019 21:18:30 +0000
From: bugzilla-daemon@bugzilla.kernel.org
To: stephen@networkplumber.org
Subject: [Bug 203533] New: VxLAN: Cannot create multiple vxlan devices for a given VNI and different source addresses.
https://bugzilla.kernel.org/show_bug.cgi?id=203533
Bug ID: 203533
Summary: VxLAN: Cannot create multiple vxlan devices for a
given VNI and different source addresses.
Product: Networking
Version: 2.5
Kernel Version: 4.9.110
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: IPV4
Assignee: stephen@networkplumber.org
Reporter: hasanrazaonline@gmail.com
Regression: No
When trying to create two vxlan terminations with different source VTEPs, only
one termination is allowed and second netdevice creation fails with EEXIST
error.
root@:~# ip link add vxlan-10 type vxlan id 10 local 10.1.1.1 dstport 4789
root@:~# ip link add vxlan2-10 type vxlan id 10 local 20.1.1.1 dstport 4789
RTNETLINK answers: File exists
root@:~#
It is a valid use-case scenario where a router is terminating multiple VxLAN
endpoints. But this doesn't seem to be allowed in the kernel.
The EEXIST error is coming from here:
vxlan_dev_configure():
...
list_for_each_entry(tmp, &vn->vxlan_list, next) {
if (tmp->cfg.vni == conf->vni &&
| (tmp->default_dst.remote_ip.sa.sa_family == AF_INET6 ||
| tmp->cfg.saddr.sa.sa_family == AF_INET6) == use_ipv6 &&
| tmp->cfg.dst_port == vxlan->cfg.dst_port &&
| (tmp->flags & VXLAN_F_RCV_FLAGS) ==
| (vxlan->flags & VXLAN_F_RCV_FLAGS)) {
pr_info("duplicate VNI %u\n", be32_to_cpu(conf->vni));
return -EEXIST;
}
}
The uniqueness of vxlan device should be checked with <local-endpoint, vni,
dstport> instead of just <vni, dstport>. Similarly, vxlan_vs_find_vni() should
lookup vxlan device using <src-addr, vni> instead of just <vni>:
static struct vxlan_dev *vxlan_vs_find_vni(struct vxlan_sock *vs, __be32 vni)
As per the code, I can see this issue exists in v5.1 as well.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-07 15:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07 15:08 Fw: [Bug 203533] New: VxLAN: Cannot create multiple vxlan devices for a given VNI and different source addresses Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).