From: ebiederm@xmission•com (Eric W. Biederman)
To: Renato Westphal <renatowestphal@gmail•com>
Cc: netdev@vger•kernel.org
Subject: Re: Move interface across network namespaces
Date: Thu, 11 Aug 2011 00:13:07 -0700 [thread overview]
Message-ID: <m1r54s8lq4.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <CAChaegkomwjL0X7HnfLi1XH26jDKOL6fCgjfms67cjjU4gRXPg@mail.gmail.com> (Renato Westphal's message of "Wed, 10 Aug 2011 21:31:39 -0300")
Renato Westphal <renatowestphal@gmail•com> writes:
> Hello,
>
> I have two questions regarding the process of moving a network
> interface across different network namespaces:
>
> * When I move an interface, all the virtual interfaces attached to it
> are deleted. Is there any reason for such odd behavior? I would like
> to move some network interfaces and keep the attached vlans untouched.
The defined semantics are that a network device is unregistered from
the networking stack in one network namespace and then registered
with the networking stack in another. It is an unfortunate fact
that when vlan devices see their underlying device being unregistered
they decide to delete themselves.
A different vlan implementation might be able to have different
properties but I can't think of any obvious solution other than
don't do move the device that you have your vlans on top of.
> * The target network namespace sends a RTM_NEWLINK netlink message
> when an interface is moved to it. In the other hand, the source
> network namespace doesn't sends a RTM_DELLINK message when an
> interface is moved from it. This is very annoying because user space
> applications (such as zebra) can't detect some interface moving
> operations and then get into an inconsistent state. Anyone knows if
> there's a workaround for this?
Not getting RTM_DELLINK is a bug. The device registration and
unregistration code has changed since dev_change_net_namespace was
written and apparently one of the changes failed to update
dev_change_net_namespace.
Eric
next prev parent reply other threads:[~2011-08-11 7:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 0:31 Move interface across network namespaces Renato Westphal
2011-08-11 7:13 ` Eric W. Biederman [this message]
2011-08-11 18:29 ` Renato Westphal
2011-08-15 13:10 ` Renato Westphal
2011-08-18 23:12 ` Eric W. Biederman
2011-08-19 14:38 ` Renato Westphal
2011-10-21 16:24 ` [PATCH] rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces Eric W. Biederman
2011-10-24 7:03 ` David Miller
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=m1r54s8lq4.fsf@fess.ebiederm.org \
--to=ebiederm@xmission$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=renatowestphal@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox