]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETNS]: Disable inetaddr notifiers in namespaces other than initial.
authorDenis V. Lunev <den@openvz.org>
Fri, 29 Feb 2008 04:46:17 +0000 (20:46 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Feb 2008 04:46:17 +0000 (20:46 -0800)
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>
drivers/net/bonding/bond_main.c
drivers/net/via-velocity.c
drivers/s390/net/qeth_main.c
net/sctp/protocol.c

index 0942d82f7cbf721f62c364941a13b31373668c5b..966643473da7175fa7d0ef25dc35f38d7f8c1dc5 100644 (file)
@@ -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) {
index c50fdeed9e8557efd46ccf2958fb98db16dbc489..1525e8a8984477a7f361dc82645c2394e356a575 100644 (file)
@@ -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) {
index 62606ce26e5562bdd1bc6a5a8447c283951ab57d..d063e9ecf8049f83d1384fbdda5ca6fd3ba2e7ed 100644 (file)
@@ -8622,6 +8622,9 @@ qeth_ip_event(struct notifier_block *this,
        struct qeth_ipaddr *addr;
        struct qeth_card *card;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        QETH_DBF_TEXT(trace,3,"ipevent");
        card = qeth_get_card_from_dev(dev);
        if (!card)
index 688546dccd828f0821736a301535049cc3d8ca04..8d9d929f6ceabdf25e6be2af3141cf7058bb348b 100644 (file)
@@ -629,6 +629,9 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
        struct sctp_sockaddr_entry *addr = NULL;
        struct sctp_sockaddr_entry *temp;
 
+       if (ifa->ifa_dev->dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        switch (ev) {
        case NETDEV_UP:
                addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC);