Skip to content

Commit 7578372

Browse files
NicolasDichtelshemminger
authored andcommitted
lib: suppress error msg when filling the cache
Before the patch: $ ip netns add foo $ ip link add name veth1 address 2a:a5:5c:b9:52:89 type veth peer name veth2 address 2a:a5:5c:b9:53:90 netns foo RTNETLINK answers: No such device RTNETLINK answers: No such device But the command was successful. This may break script. Let's remove those error messages. Fixes: 55870df ("Improve batch and dump times by caching link lookups") Reported-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
1 parent 1bb38f6 commit 7578372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ll_map.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static int ll_link_get(const char *name, int index)
177177
addattr_l(&req.n, sizeof(req), IFLA_IFNAME, name,
178178
strlen(name) + 1);
179179

180-
if (rtnl_talk(&rth, &req.n, &answer) < 0)
180+
if (rtnl_talk_suppress_rtnl_errmsg(&rth, &req.n, &answer) < 0)
181181
goto out;
182182

183183
/* add entry to cache */

0 commit comments

Comments
 (0)