From db1aafd883262752304064a5afc06b41417d5c84 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Wed, 13 Feb 2019 15:53:21 -0800 Subject: [PATCH] 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 --- ip/iplink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ip/iplink.c b/ip/iplink.c index 3a0cf459..5a3c9613 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; } -- 2.39.2