]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip link: Drop cache entry on any changes
authorDavid Ahern <dsahern@gmail.com>
Wed, 13 Feb 2019 23:53:21 +0000 (15:53 -0800)
committerDavid Ahern <dsahern@gmail.com>
Sat, 23 Feb 2019 02:51:18 +0000 (18:51 -0800)
Remove any entry from the link cache when the link is modified.

Signed-off-by: David Ahern <dsahern@gmail.com>
ip/iplink.c

index 3a0cf4595237dd0fd5ab41932c253b7787120607..5a3c9613c91546eba94dbccc52b085d0ae5dcd13 100644 (file)
@@ -1083,6 +1083,9 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
        if (rtnl_talk(&rth, &req.n, NULL) < 0)
                return -2;
 
+       /* remove device from cache; next use can refresh with new data */
+       ll_drop_by_index(req.i.ifi_index);
+
        return 0;
 }