From: Toshiaki Makita <makita.toshiaki@lab•ntt.co.jp>
To: Ding Tianhong <dingtianhong@huawei•com>,
kaber@trash•net, julia.lawall@lip6•fr
Cc: joe@perches•com, davem@davemloft•net, netdev@vger•kernel.org
Subject: Re: [PATCH net-next 1/2] vlan: don't allow vlan device to move between network namespaces
Date: Fri, 28 Feb 2014 17:12:17 +0900 [thread overview]
Message-ID: <531044E1.6070005@lab.ntt.co.jp> (raw)
In-Reply-To: <1393573839-32316-2-git-send-email-dingtianhong@huawei.com>
(2014/02/28 16:50), Ding Tianhong wrote:
> Now the vlan device could move to another network namespace, but
> the read dev is sill in the old network namespace, it is unsafe
> and the vlan device could not work well, so don't allow to do it.
Why is this a problem?
This looks like a useful feature to me.
Thanks,
Toshiaki Makita
>
> Signed-off-by: Ding Tianhong <dingtianhong@huawei•com>
> ---
> net/8021q/vlan_dev.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index 566adbf..76d8fab 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -791,5 +791,8 @@ void vlan_setup(struct net_device *dev)
> dev->destructor = free_netdev;
> dev->ethtool_ops = &vlan_ethtool_ops;
>
> + /* don't allow vlan device to move between network namespaces */
> + dev->features |= NETIF_F_NETNS_LOCAL;
> +
> memset(dev->broadcast, 0, ETH_ALEN);
> }
>
next prev parent reply other threads:[~2014-02-28 8:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 7:50 [PATCH net-next 0/2] vlan: fix ns issue and slight optimization Ding Tianhong
2014-02-28 7:50 ` [PATCH net-next 1/2] vlan: don't allow vlan device to move between network namespaces Ding Tianhong
2014-02-28 8:12 ` Toshiaki Makita [this message]
2014-02-28 8:52 ` Ding Tianhong
2014-02-28 13:07 ` Toshiaki Makita
2014-03-03 0:57 ` Ding Tianhong
2014-02-28 7:50 ` [PATCH net-next 2/2] vlan: use ether_addr_equal_64bits to instead of ether_addr_equal Ding Tianhong
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=531044E1.6070005@lab.ntt.co.jp \
--to=makita.toshiaki@lab$(echo .)ntt.co.jp \
--cc=davem@davemloft$(echo .)net \
--cc=dingtianhong@huawei$(echo .)com \
--cc=joe@perches$(echo .)com \
--cc=julia.lawall@lip6$(echo .)fr \
--cc=kaber@trash$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
/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