Skip to contentSkip to conversation

Revert "rtnetlink: add rtnl_link_state check in rtnl_configure_link"

PATCH In review [email protected] 1 participant 2 messages Sep 12, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "rtnetlink: add rtnl_link_state check in rtnl_configure_link"

From: Liam McBirnie <[email protected]>

This reverts commit 8d356b89f36d234a56434a110ae779e8ac389ca2.

This commit was intended to remove duplicate RTM_NEWLINK notifications by only sending the notification if the link hadn't been initialized. However, if a vxlan is created and set up with the same message, then no netlink notification is sent showing that the link has been set up.

This commit was part of a series of commits which fixed the ordering of netlink notifications for vxlans.
Reverting this commit preserves the ordering but adds another RTM_NEWLINK notification to the end.

---
 net/core/rtnetlink.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
net/core/rtnetlink.c +3 -6
index 60c928894a78..3bd5455a1cb1 100644
@@ -2809,12 +2809,9 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm)
 			return err;
 	}
 
-	if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) {
-		__dev_notify_flags(dev, old_flags, 0U);
-	} else {
-		dev->rtnl_link_state = RTNL_LINK_INITIALIZED;
-		__dev_notify_flags(dev, old_flags, ~0U);
-	}
+	dev->rtnl_link_state = RTNL_LINK_INITIALIZED;
+
+	__dev_notify_flags(dev, old_flags, ~0U);
 	return 0;
 }
 EXPORT_SYMBOL(rtnl_configure_link);
Signature · 1 line
2.14.3