From: David Ahern Date: Wed, 13 Feb 2019 23:53:21 +0000 (-0800) Subject: ip link: Drop cache entry on any changes X-Git-Tag: v5.1.0~27^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db1aafd883262752304064a5afc06b41417d5c84;p=thirdparty%2Fiproute2.git ip link: Drop cache entry on any changes Remove any entry from the link cache when the link is modified. Signed-off-by: David Ahern --- diff --git a/ip/iplink.c b/ip/iplink.c index 3a0cf4595..5a3c9613c 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -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; }