diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 5a7f20f78574..26090621ea6b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2577,7 +2577,7 @@ unsigned dev_get_flags(const struct net_device *dev) | |||
2577 | 2577 | ||
2578 | int dev_change_flags(struct net_device *dev, unsigned flags) | 2578 | int dev_change_flags(struct net_device *dev, unsigned flags) |
2579 | { | 2579 | { |
2580 | int ret; | 2580 | int ret, changes; |
2581 | int old_flags = dev->flags; | 2581 | int old_flags = dev->flags; |
2582 | 2582 | ||
2583 | /* | 2583 | /* |
@@ -2632,8 +2632,10 @@ int dev_change_flags(struct net_device *dev, unsigned flags) | |||
2632 | dev_set_allmulti(dev, inc); | 2632 | dev_set_allmulti(dev, inc); |
2633 | } | 2633 | } |
2634 | 2634 | ||
2635 | if (old_flags ^ dev->flags) | 2635 | /* Exclude state transition flags, already notified */ |
2636 | rtmsg_ifinfo(RTM_NEWLINK, dev, old_flags ^ dev->flags); | 2636 | changes = (old_flags ^ dev->flags) & ~(IFF_UP | IFF_RUNNING); |
2637 | if (changes) | ||
2638 | rtmsg_ifinfo(RTM_NEWLINK, dev, changes); | ||
2637 | 2639 | ||
2638 | return ret; | 2640 | return ret; |
2639 | } | 2641 | } |