mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2026-01-04 14:53:46 +00:00
libnetlink: don't print NETLINK_SOCK_DIAG errors in rtnl_talk
This change is a no-op, as currently no code uses rtnl_talk on NETLINK_SOCK_DIAG_BY_FAMILY sockets. It is needed to suppress spurious errors when using SOCK_DESTROY via rtnl_talk. Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
This commit is contained in:
parent
1ab0f02f46
commit
57fdf2d4d9
@ -419,8 +419,10 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
|
||||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stderr, "RTNETLINK answers: %s\n",
|
||||
strerror(-err->error));
|
||||
if (rtnl->proto != NETLINK_SOCK_DIAG)
|
||||
fprintf(stderr,
|
||||
"RTNETLINK answers: %s\n",
|
||||
strerror(-err->error));
|
||||
errno = -err->error;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user