aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopa Prabhu <roopa@cumulusnetworks.com>2018-09-12 16:21:48 -0400
committerDavid S. Miller <davem@davemloft.net>2018-09-13 14:01:32 -0400
commit56a49d7048703f5ffdb84d3a0ee034108fba6850 (patch)
tree4d0dd5aaa47fb289f1436e6b344f4a46acd8e5dd
parent9824dfae5741275473a23a7ed5756c7b6efacc9d (diff)
net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags
This fix addresses https://bugzilla.kernel.org/show_bug.cgi?id=201071 Commit 5025f7f7d506 wrongly relied on __dev_change_flags to notify users of dev flag changes in the case when dev->rtnl_link_state = RTNL_LINK_INITIALIZED. Fix it by indicating flag changes explicitly to __dev_notify_flags. Fixes: 5025f7f7d506 ("rtnetlink: add rtnl_link_state check in rtnl_configure_link") Reported-By: Liam mcbirnie <liam.mcbirnie@boeing.com> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/rtnetlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 60c928894a78..63ce2283a456 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2810,7 +2810,7 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm)
2810 } 2810 }
2811 2811
2812 if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) { 2812 if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) {
2813 __dev_notify_flags(dev, old_flags, 0U); 2813 __dev_notify_flags(dev, old_flags, (old_flags ^ dev->flags));
2814 } else { 2814 } else {
2815 dev->rtnl_link_state = RTNL_LINK_INITIALIZED; 2815 dev->rtnl_link_state = RTNL_LINK_INITIALIZED;
2816 __dev_notify_flags(dev, old_flags, ~0U); 2816 __dev_notify_flags(dev, old_flags, ~0U);