From mboxrd@z Thu Jan 1 00:00:00 1970 From: mcbirnie.l@gmail.com Subject: [PATCH net] Revert "rtnetlink: add rtnl_link_state check in rtnl_configure_link" Date: Wed, 12 Sep 2018 09:11:10 +1000 Message-ID: <20180911231110.3506-1-mcbirnie.l@gmail.com> Cc: Liam McBirnie To: netdev@vger.kernel.org Return-path: Received: from mail-pg1-f194.google.com ([209.85.215.194]:39973 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725737AbeILEJz (ORCPT ); Wed, 12 Sep 2018 00:09:55 -0400 Received: by mail-pg1-f194.google.com with SMTP id l63-v6so12993580pga.7 for ; Tue, 11 Sep 2018 16:08:24 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: From: Liam McBirnie 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. Signed-off-by: Liam McBirnie --- net/core/rtnetlink.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 60c928894a78..3bd5455a1cb1 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -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); -- 2.14.3