Re: Network namespace and bonding WARNING at fs/proc/generic.c remove_proc_entry

2 messages, 2 authors, 2012-07-06 · open the first message on its own page

Re: Network namespace and bonding WARNING at fs/proc/generic.c remove_proc_entry

From: Eric W. Biederman <hidden>
Date: 2012-07-06 18:57:19

"Serge E. Hallyn" [off-list ref] writes:
quoted
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2ee8cf9..818ed64 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4345,6 +4345,9 @@ static void bond_setup(struct net_device *bond_dev)
        bond_dev->priv_flags |= IFF_BONDING;
        bond_dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
 
+       /* Don't allow bond devices to change network namespaces. */
+       bond_dev->features |= NETIF_F_LOCAL;
I believe this needs to be NETIF_F_NETNS_LOCAL.  Test build still going with
that change.
Yes that is what I mean.

Eric

Re: Network namespace and bonding WARNING at fs/proc/generic.c remove_proc_entry

From: "Serge E. Hallyn" <serge@hallyn.com>
Date: 2012-07-06 19:46:41

Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org):
"Serge E. Hallyn" [off-list ref] writes:
quoted
quoted
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2ee8cf9..818ed64 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4345,6 +4345,9 @@ static void bond_setup(struct net_device *bond_dev)
        bond_dev->priv_flags |= IFF_BONDING;
        bond_dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
 
+       /* Don't allow bond devices to change network namespaces. */
+       bond_dev->features |= NETIF_F_LOCAL;
I believe this needs to be NETIF_F_NETNS_LOCAL.  Test build still going with
that change.
Yes that is what I mean.
With that change, build is fine, boots fine, I can't pass a bond to another
netns (preventing the problem), and I can create a bond in a child netns
just fine.

Thanks!

Acked-by: Serge Hallyn <redacted>

-serge
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help