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 <dsahern@gmail.com>
This commit is contained in:
David Ahern 2019-02-13 15:53:21 -08:00
parent 25c6339b22
commit db1aafd883
1 changed files with 3 additions and 0 deletions

View 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;
}