diff options
-rw-r--r-- | include/linux/netdevice.h | 5 | ||||
-rw-r--r-- | net/core/dev.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 13a34848b5e1..850271809a9e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1604,6 +1604,11 @@ struct netdev_notifier_info { | |||
1604 | struct net_device *dev; | 1604 | struct net_device *dev; |
1605 | }; | 1605 | }; |
1606 | 1606 | ||
1607 | struct netdev_notifier_change_info { | ||
1608 | struct netdev_notifier_info info; /* must be first */ | ||
1609 | unsigned int flags_changed; | ||
1610 | }; | ||
1611 | |||
1607 | static inline struct net_device * | 1612 | static inline struct net_device * |
1608 | netdev_notifier_info_to_dev(const struct netdev_notifier_info *info) | 1613 | netdev_notifier_info_to_dev(const struct netdev_notifier_info *info) |
1609 | { | 1614 | { |
diff --git a/net/core/dev.c b/net/core/dev.c index 54fce6006a83..6eb621cc3b81 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -4771,8 +4771,13 @@ void __dev_notify_flags(struct net_device *dev, unsigned int old_flags) | |||
4771 | } | 4771 | } |
4772 | 4772 | ||
4773 | if (dev->flags & IFF_UP && | 4773 | if (dev->flags & IFF_UP && |
4774 | (changes & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI | IFF_VOLATILE))) | 4774 | (changes & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI | IFF_VOLATILE))) { |
4775 | call_netdevice_notifiers(NETDEV_CHANGE, dev); | 4775 | struct netdev_notifier_change_info change_info; |
4776 | |||
4777 | change_info.flags_changed = changes; | ||
4778 | call_netdevice_notifiers_info(NETDEV_CHANGE, dev, | ||
4779 | &change_info.info); | ||
4780 | } | ||
4776 | } | 4781 | } |
4777 | 4782 | ||
4778 | /** | 4783 | /** |