]> git.baikalelectronics.ru Git - kernel.git/commit
net: allow macvlans to move to net namespace
authorFrancesco Ruggeri <fruggeri@arista.com>
Wed, 17 Sep 2014 17:40:44 +0000 (10:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Sep 2014 21:07:20 +0000 (17:07 -0400)
commit81c11d3a2bae9059a62aeaded49a7e8bcb89fc26
tree1605a683d6d154b868cf3f49db00454a4e131843
parente76b0b0578c461628560db9f69adf8ece7d55ff3
net: allow macvlans to move to net namespace

I cannot move a macvlan interface created on top of a bonding interface
to a different namespace:

% ip netns add dummy0
% ip link add link bond0 mac0 type macvlan
% ip link set mac0 netns dummy0
RTNETLINK answers: Invalid argument
%

The problem seems to be that commit e8130164ad29 ("bonding: Don't allow
bond devices to change network namespaces.") sets NETIF_F_NETNS_LOCAL
on bonding interfaces, and commit c6a6465a0b30 ("macvlan: fix netdev
feature propagation from lower device") causes macvlan interfaces
to inherit its features from the lower device.

NETIF_F_NETNS_LOCAL should not be inherited from the lower device
by a macvlan.
Patch tested on 3.16.

Signed-off-by: Francesco Ruggeri <fruggeri@arista.com>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c