From: Ding Tianhong <dingtianhong@huawei.com>
To: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>,
<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 16:52:29 +0800 [thread overview]
Message-ID: <53104E4D.8060706@huawei.com> (raw)
In-Reply-To: <531044E1.6070005@lab.ntt.co.jp>
On 2014/2/28 16:12, Toshiaki Makita wrote:
> (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
>
I think the vlan dev is a virtual device, if it does not with real dev together,
I am not sure whether it is correct. Maybe I miss something, pls remind me.
Thanks
Ding
>>
>> 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:53 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
2014-02-28 8:52 ` Ding Tianhong [this message]
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=53104E4D.8060706@huawei.com \
--to=dingtianhong@huawei.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=julia.lawall@lip6.fr \
--cc=kaber@trash.net \
--cc=makita.toshiaki@lab.ntt.co.jp \
--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).