[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2dc1646c-ac58-f633-0c28-0c3197574cf3@6wind.com>
Date: Tue, 21 May 2019 11:28:22 +0200
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Tonghao Zhang <xiangxia.m.yue@...il.com>,
David Miller <davem@...emloft.net>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: vxlan: disallow removing to other namespace
Le 21/05/2019 à 07:53, Tonghao Zhang a écrit :
[snip]
> The problem is that we create one vxlan netdevice(e.g dstport 4789 and
> external), and move it to
> one net-namespace, and then we hope create one again(dstport 4789 and
> external) and move it to other net-namespace, but we can't create it.
>
> $ ip netns add ns100
> $ ip link add vxlan100 type vxlan dstport 4789 external
> $ ip link set dev vxlan100 netns ns100
> $ ip link add vxlan200 type vxlan dstport 4789 external
> RTNETLINK answers: File exists
Why is this a problem? This error is correct, the interface already exists.
>
> The better way is that we should create directly it in the
> net-namespace. To avoid confuse user, disallow moving it to other
> net-namespace.
There is no confusion, this is a feature. This link part of the vxlan is in
another namespace:
$ ip -d -n ns100 link ls vxlan100
15: vxlan100: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT
group default qlen 1000
link/ether d6:54:ea:b4:46:a5 brd ff:ff:ff:ff:ff:ff link-netnsid 0
promiscuity 0 minmtu 68 maxmtu 65535
vxlan externaladdrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size
65536 gso_max_segs 65535
=> "link-netnsid 0" means that the link part is in the nsid 0, ie init_net in my
case.
Regards,
Nicolas
Powered by blists - more mailing lists