From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Tonghao Zhang <xiangxia.m.yue@gmail.com>,
David Miller <davem@davemloft.net>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: vxlan: disallow removing to other namespace
Date: Tue, 21 May 2019 11:28:22 +0200 [thread overview]
Message-ID: <2dc1646c-ac58-f633-0c28-0c3197574cf3@6wind.com> (raw)
In-Reply-To: <CAMDZJNWpv89beaNvVvycJ5YqwcKYiFNuP_gYKz_QmsQ2roiRGw@mail.gmail.com>
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
next prev parent reply other threads:[~2019-05-21 9:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-18 2:42 [PATCH] net: vxlan: disallow removing to other namespace xiangxia.m.yue
2019-05-20 23:53 ` David Miller
2019-05-21 5:53 ` Tonghao Zhang
2019-05-21 9:28 ` Nicolas Dichtel [this message]
2019-05-21 11:08 ` Tonghao Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2dc1646c-ac58-f633-0c28-0c3197574cf3@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=xiangxia.m.yue@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.