netlink: fix error message suppression

Rewrite of nlsock_process_reply() used a bool variable to store the value
of nlctx->suppress_nlerr before passing to nlsock_process_ack(). This
causes the value of 2 (suppress all error/warning messages) to be converted
to 1 (suppress only -EOPNOTSUPP). As a result, -ENOENT returned by failed
genetlink family lookup when running on kernel without ethtool netlink
support is not ignored and misleading "netlink error: No such file or
directory" message is issued even if the ioctl fallback works as expected.

Fixes: 76bdf9372824 ("netlink: use pretty printing for ethtool netlink messages")
Reported-by: Heiner Kallweit <>
Signed-off-by: Michal Kubecek <>
1 file changed