diff --git a/lib/libnetlink.c b/lib/libnetlink.c index a9932d42..d9de4f20 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -664,11 +664,11 @@ static int __rtnl_talk_iov(struct rtnl_handle *rtnl, struct iovec *iov, return -1; } - if (!err->error) + if (!error) { /* check messages from kernel */ nl_dump_ext_ack(h, errfn); - else { - errno = -err->error; + } else { + errno = -error; if (rtnl->proto != NETLINK_SOCK_DIAG && show_rtnl_err)