Commit 6133fb1a authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

[NETNS]: Disable inetaddr notifiers in namespaces other than initial.

ip_fib_init is kept enabled. It is already namespace-aware.
Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6fc68624
...@@ -3511,6 +3511,9 @@ static int bond_inetaddr_event(struct notifier_block *this, unsigned long event, ...@@ -3511,6 +3511,9 @@ static int bond_inetaddr_event(struct notifier_block *this, unsigned long event,
struct bonding *bond, *bond_next; struct bonding *bond, *bond_next;
struct vlan_entry *vlan, *vlan_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) { list_for_each_entry_safe(bond, bond_next, &bond_dev_list, bond_list) {
if (bond->dev == event_dev) { if (bond->dev == event_dev) {
switch (event) { switch (event) {
......
...@@ -3464,6 +3464,9 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi ...@@ -3464,6 +3464,9 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi
struct velocity_info *vptr; struct velocity_info *vptr;
unsigned long flags; unsigned long flags;
if (dev->nd_net != &init_net)
return NOTIFY_DONE;
spin_lock_irqsave(&velocity_dev_list_lock, flags); spin_lock_irqsave(&velocity_dev_list_lock, flags);
list_for_each_entry(vptr, &velocity_dev_list, list) { list_for_each_entry(vptr, &velocity_dev_list, list) {
if (vptr->dev == dev) { if (vptr->dev == dev) {
......
...@@ -8622,6 +8622,9 @@ qeth_ip_event(struct notifier_block *this, ...@@ -8622,6 +8622,9 @@ qeth_ip_event(struct notifier_block *this,
struct qeth_ipaddr *addr; struct qeth_ipaddr *addr;
struct qeth_card *card; struct qeth_card *card;
if (dev->nd_net != &init_net)
return NOTIFY_DONE;
QETH_DBF_TEXT(trace,3,"ipevent"); QETH_DBF_TEXT(trace,3,"ipevent");
card = qeth_get_card_from_dev(dev); card = qeth_get_card_from_dev(dev);
if (!card) if (!card)
......
...@@ -629,6 +629,9 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, ...@@ -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 *addr = NULL;
struct sctp_sockaddr_entry *temp; struct sctp_sockaddr_entry *temp;
if (ifa->ifa_dev->dev->nd_net != &init_net)
return NOTIFY_DONE;
switch (ev) { switch (ev) {
case NETDEV_UP: case NETDEV_UP:
addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC); addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment