diff options
author | Denis V. Lunev <den@openvz.org> | 2008-02-28 23:46:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-28 23:46:17 -0500 |
commit | 6133fb1aa137b35a8fa91ec17977ebf6a41456ec (patch) | |
tree | 5bd2411fa97f9712f25ee95053a242db025b209c | |
parent | 6fc68624e524014fcd95faf726f855eb348f2e87 (diff) |
[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 <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 3 | ||||
-rw-r--r-- | drivers/net/via-velocity.c | 3 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 3 | ||||
-rw-r--r-- | net/sctp/protocol.c | 3 |
4 files changed, 12 insertions, 0 deletions
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, | |||
3511 | struct bonding *bond, *bond_next; | 3511 | struct bonding *bond, *bond_next; |
3512 | struct vlan_entry *vlan, *vlan_next; | 3512 | struct vlan_entry *vlan, *vlan_next; |
3513 | 3513 | ||
3514 | if (ifa->ifa_dev->dev->nd_net != &init_net) | ||
3515 | return NOTIFY_DONE; | ||
3516 | |||
3514 | list_for_each_entry_safe(bond, bond_next, &bond_dev_list, bond_list) { | 3517 | list_for_each_entry_safe(bond, bond_next, &bond_dev_list, bond_list) { |
3515 | if (bond->dev == event_dev) { | 3518 | if (bond->dev == event_dev) { |
3516 | switch (event) { | 3519 | 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 | |||
3464 | struct velocity_info *vptr; | 3464 | struct velocity_info *vptr; |
3465 | unsigned long flags; | 3465 | unsigned long flags; |
3466 | 3466 | ||
3467 | if (dev->nd_net != &init_net) | ||
3468 | return NOTIFY_DONE; | ||
3469 | |||
3467 | spin_lock_irqsave(&velocity_dev_list_lock, flags); | 3470 | spin_lock_irqsave(&velocity_dev_list_lock, flags); |
3468 | list_for_each_entry(vptr, &velocity_dev_list, list) { | 3471 | list_for_each_entry(vptr, &velocity_dev_list, list) { |
3469 | if (vptr->dev == dev) { | 3472 | if (vptr->dev == dev) { |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 62606ce26e55..d063e9ecf804 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -8622,6 +8622,9 @@ qeth_ip_event(struct notifier_block *this, | |||
8622 | struct qeth_ipaddr *addr; | 8622 | struct qeth_ipaddr *addr; |
8623 | struct qeth_card *card; | 8623 | struct qeth_card *card; |
8624 | 8624 | ||
8625 | if (dev->nd_net != &init_net) | ||
8626 | return NOTIFY_DONE; | ||
8627 | |||
8625 | QETH_DBF_TEXT(trace,3,"ipevent"); | 8628 | QETH_DBF_TEXT(trace,3,"ipevent"); |
8626 | card = qeth_get_card_from_dev(dev); | 8629 | card = qeth_get_card_from_dev(dev); |
8627 | if (!card) | 8630 | if (!card) |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 688546dccd82..8d9d929f6cea 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -629,6 +629,9 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
629 | struct sctp_sockaddr_entry *addr = NULL; | 629 | struct sctp_sockaddr_entry *addr = NULL; |
630 | struct sctp_sockaddr_entry *temp; | 630 | struct sctp_sockaddr_entry *temp; |
631 | 631 | ||
632 | if (ifa->ifa_dev->dev->nd_net != &init_net) | ||
633 | return NOTIFY_DONE; | ||
634 | |||
632 | switch (ev) { | 635 | switch (ev) { |
633 | case NETDEV_UP: | 636 | case NETDEV_UP: |
634 | addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC); | 637 | addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC); |