summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Valerio <pvalerio@redhat.com>2021-08-11 17:43:43 +0200
committerIlya Maximets <i.maximets@ovn.org>2021-08-16 19:37:20 +0200
commit0ba4568fb69f18590c27e85136dc1bc570805c78 (patch)
treecfa58e58fb045aef887f64c36d280c2a61c6b9ac
parent9967927e9dc144c250282b72fc3f9d4e410e0985 (diff)
downloadopenvswitch-0ba4568fb69f18590c27e85136dc1bc570805c78.tar.gz
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 <mleitner@redhat.com> Reviewed-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Signed-off-by: Paolo Valerio <pvalerio@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--lib/netlink-socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index 47077e947..5cb96fa6e 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;