From d08c086e568afa1df91e439d0af188a25f7bfecb Mon Sep 17 00:00:00 2001 From: Paolo Valerio Date: Wed, 11 Aug 2021 17:43:43 +0200 Subject: netlink-socket: Replace error with txn->error when logging nacked transactions. in case nl_msg_nlmsgerr returns true which basically means that the nlmsg_type == NLMSG_ERROR, we need to log the error code, besides the descriptive representation, stored by nl_msg_nlmsgerr instead of "error". Fixes: 72d32ac0b3a1 ("netlink-socket: Make caller provide message receive buffers.") Suggested-by: Marcelo Ricardo Leitner Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Paolo Valerio Signed-off-by: Ilya Maximets --- lib/netlink-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index 534bb5061..5867de564 100644 --- a/lib/netlink-socket.c +++ b/lib/netlink-socket.c @@ -917,7 +917,7 @@ nl_sock_transact_multiple__(struct nl_sock *sock, } if (txn->error) { VLOG_DBG_RL(&rl, "received NAK error=%d (%s)", - error, ovs_strerror(txn->error)); + txn->error, ovs_strerror(txn->error)); } } else { txn->error = 0; -- cgit v1.2.1