From: Renato Westphal <renatowestphal@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: netdev@vger.kernel.org, kaber@trash.net,
David Lamparter <equinox@diac24.net>
Subject: Re: Move interface across network namespaces
Date: Fri, 19 Aug 2011 11:38:33 -0300 [thread overview]
Message-ID: <CAChaegnHchLT0BV-_RaPT2-J3ZLin_U1x8X0KBi7ku1MArug1g@mail.gmail.com> (raw)
In-Reply-To: <m14o1e71qe.fsf@fess.ebiederm.org>
>> Well, this regression was introduced by commit a2835763e130c343ac,
>> which was merged into v2.6.34. Reverting parts of this commit makes
>> the problem go away but breaks the support of "specifying device flags
>> during device creation". I don't know the best way to fix this... any
>> ideas?
>
> Everything going through dev_change_net_namespace already needs to be
> in the initialized state. So it looks like we just need to do:
>
> Does the patch below work for you?
>
> Eric
>
> ---
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 17d67b5..bfbde69 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -6108,6 +6108,8 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
> call_netdevice_notifiers(NETDEV_UNREGISTER, dev);
> call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev);
>
> + rtmsg_ifinfo(RTM_DELLINK, dev, ~0U);
> +
> /*
> * Flush the unicast and multicast chains
> */
>
This works pretty fine. Thanks! :)
--
Renato Westphal
next prev parent reply other threads:[~2011-08-19 14:38 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
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 [this message]
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=CAChaegnHchLT0BV-_RaPT2-J3ZLin_U1x8X0KBi7ku1MArug1g@mail.gmail.com \
--to=renatowestphal@gmail.com \
--cc=ebiederm@xmission.com \
--cc=equinox@diac24.net \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/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 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).