From 45ce4bc8eb86923c7993e1387e663ee230aeccef Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 23 Jul 2019 08:21:51 -0500 Subject: [PATCH] monitor: Fix printing of nlmsgerr netlink messages --- monitor/nlmon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monitor/nlmon.c b/monitor/nlmon.c index e42dca61..f92cb612 100644 --- a/monitor/nlmon.c +++ b/monitor/nlmon.c @@ -6108,9 +6108,10 @@ static void print_nlmsg(const struct timeval *tv, const struct nlmsghdr *nlmsg) switch (nlmsg->nlmsg_type) { case NLMSG_ERROR: err = NLMSG_DATA(nlmsg); - status = -err->error; + status = err->error; if (status < 0) - print_field("Error: %d (%s)", status, strerror(status)); + print_field("Error: %d (%s)", + status, strerror(-status)); else print_field("ACK: %d", status); break;