The netlink specfication requires that error field contains a negative value of errno.
Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com> --- bsd/sys/compat/linux/linux_netlink.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd/sys/compat/linux/linux_netlink.cc b/bsd/sys/compat/linux/linux_netlink.cc index be9ea1b8..ec7e9341 100644 --- a/bsd/sys/compat/linux/linux_netlink.cc +++ b/bsd/sys/compat/linux/linux_netlink.cc @@ -506,7 +506,7 @@ netlink_senderr(struct socket *so, struct nlmsghdr *nlm, int error) return ENOBUFS; } err = (struct nlmsgerr *) nlmsg_data(hdr); - err->error = error; + err->error = -error; //Per netlink spec - "Negative errno or 0 for acknowledgements" if (nlm) { err->msg = *nlm; } else { -- 2.35.1 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/20220604012837.214986-9-jwkozaczuk%40gmail.com.