diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/clip.c | 4 | ||||
-rw-r--r-- | net/core/dev.c | 6 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_MASQUERADE.c | 5 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 7 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_MASQUERADE.c | 4 |
5 files changed, 15 insertions, 11 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c index cce241eb01d9..8215f7cb170b 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -575,6 +575,7 @@ static int clip_inet_event(struct notifier_block *this, unsigned long event, | |||
575 | void *ifa) | 575 | void *ifa) |
576 | { | 576 | { |
577 | struct in_device *in_dev; | 577 | struct in_device *in_dev; |
578 | struct netdev_notifier_info info; | ||
578 | 579 | ||
579 | in_dev = ((struct in_ifaddr *)ifa)->ifa_dev; | 580 | in_dev = ((struct in_ifaddr *)ifa)->ifa_dev; |
580 | /* | 581 | /* |
@@ -583,7 +584,8 @@ static int clip_inet_event(struct notifier_block *this, unsigned long event, | |||
583 | */ | 584 | */ |
584 | if (event != NETDEV_UP) | 585 | if (event != NETDEV_UP) |
585 | return NOTIFY_DONE; | 586 | return NOTIFY_DONE; |
586 | return clip_device_event(this, NETDEV_CHANGE, in_dev->dev); | 587 | netdev_notifier_info_init(&info, in_dev->dev); |
588 | return clip_device_event(this, NETDEV_CHANGE, &info); | ||
587 | } | 589 | } |
588 | 590 | ||
589 | static struct notifier_block clip_dev_notifier = { | 591 | static struct notifier_block clip_dev_notifier = { |
diff --git a/net/core/dev.c b/net/core/dev.c index 6eb621cc3b81..b2e9057be3bf 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1391,12 +1391,6 @@ void dev_disable_lro(struct net_device *dev) | |||
1391 | } | 1391 | } |
1392 | EXPORT_SYMBOL(dev_disable_lro); | 1392 | EXPORT_SYMBOL(dev_disable_lro); |
1393 | 1393 | ||
1394 | static void netdev_notifier_info_init(struct netdev_notifier_info *info, | ||
1395 | struct net_device *dev) | ||
1396 | { | ||
1397 | info->dev = dev; | ||
1398 | } | ||
1399 | |||
1400 | static int call_netdevice_notifier(struct notifier_block *nb, unsigned long val, | 1394 | static int call_netdevice_notifier(struct notifier_block *nb, unsigned long val, |
1401 | struct net_device *dev) | 1395 | struct net_device *dev) |
1402 | { | 1396 | { |
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c index dd5508bde799..30e4de940567 100644 --- a/net/ipv4/netfilter/ipt_MASQUERADE.c +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c | |||
@@ -129,7 +129,10 @@ static int masq_inet_event(struct notifier_block *this, | |||
129 | void *ptr) | 129 | void *ptr) |
130 | { | 130 | { |
131 | struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev; | 131 | struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev; |
132 | return masq_device_event(this, event, dev); | 132 | struct netdev_notifier_info info; |
133 | |||
134 | netdev_notifier_info_init(&info, dev); | ||
135 | return masq_device_event(this, event, &info); | ||
133 | } | 136 | } |
134 | 137 | ||
135 | static struct notifier_block masq_dev_notifier = { | 138 | static struct notifier_block masq_dev_notifier = { |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index bce073b4bbd4..7b34f06af344 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -4645,13 +4645,16 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, | |||
4645 | 4645 | ||
4646 | static void dev_disable_change(struct inet6_dev *idev) | 4646 | static void dev_disable_change(struct inet6_dev *idev) |
4647 | { | 4647 | { |
4648 | struct netdev_notifier_info info; | ||
4649 | |||
4648 | if (!idev || !idev->dev) | 4650 | if (!idev || !idev->dev) |
4649 | return; | 4651 | return; |
4650 | 4652 | ||
4653 | netdev_notifier_info_init(&info, idev->dev); | ||
4651 | if (idev->cnf.disable_ipv6) | 4654 | if (idev->cnf.disable_ipv6) |
4652 | addrconf_notify(NULL, NETDEV_DOWN, idev->dev); | 4655 | addrconf_notify(NULL, NETDEV_DOWN, &info); |
4653 | else | 4656 | else |
4654 | addrconf_notify(NULL, NETDEV_UP, idev->dev); | 4657 | addrconf_notify(NULL, NETDEV_UP, &info); |
4655 | } | 4658 | } |
4656 | 4659 | ||
4657 | static void addrconf_disable_change(struct net *net, __s32 newf) | 4660 | static void addrconf_disable_change(struct net *net, __s32 newf) |
diff --git a/net/ipv6/netfilter/ip6t_MASQUERADE.c b/net/ipv6/netfilter/ip6t_MASQUERADE.c index b76257cd7e1e..47bff6107519 100644 --- a/net/ipv6/netfilter/ip6t_MASQUERADE.c +++ b/net/ipv6/netfilter/ip6t_MASQUERADE.c | |||
@@ -89,8 +89,10 @@ static int masq_inet_event(struct notifier_block *this, | |||
89 | unsigned long event, void *ptr) | 89 | unsigned long event, void *ptr) |
90 | { | 90 | { |
91 | struct inet6_ifaddr *ifa = ptr; | 91 | struct inet6_ifaddr *ifa = ptr; |
92 | struct netdev_notifier_info info; | ||
92 | 93 | ||
93 | return masq_device_event(this, event, ifa->idev->dev); | 94 | netdev_notifier_info_init(&info, ifa->idev->dev); |
95 | return masq_device_event(this, event, &info); | ||
94 | } | 96 | } |
95 | 97 | ||
96 | static struct notifier_block masq_inet_notifier = { | 98 | static struct notifier_block masq_inet_notifier = { |