From 6133fb1aa137b35a8fa91ec17977ebf6a41456ec Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Thu, 28 Feb 2008 20:46:17 -0800 Subject: [NETNS]: Disable inetaddr notifiers in namespaces other than initial. ip_fib_init is kept enabled. It is already namespace-aware. Signed-off-by: Denis V. Lunev Signed-off-by: David S. Miller --- drivers/net/bonding/bond_main.c | 3 +++ drivers/net/via-velocity.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'drivers/net') diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 0942d82f7cbf..966643473da7 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3511,6 +3511,9 @@ static int bond_inetaddr_event(struct notifier_block *this, unsigned long event, struct bonding *bond, *bond_next; struct vlan_entry *vlan, *vlan_next; + if (ifa->ifa_dev->dev->nd_net != &init_net) + return NOTIFY_DONE; + list_for_each_entry_safe(bond, bond_next, &bond_dev_list, bond_list) { if (bond->dev == event_dev) { switch (event) { diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index c50fdeed9e85..1525e8a89844 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -3464,6 +3464,9 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi struct velocity_info *vptr; unsigned long flags; + if (dev->nd_net != &init_net) + return NOTIFY_DONE; + spin_lock_irqsave(&velocity_dev_list_lock, flags); list_for_each_entry(vptr, &velocity_dev_list, list) { if (vptr->dev == dev) { -- cgit v1.2.2