mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
netlink: add support for multi-part netlink messages.
Such messages do not have NLMSG_ERROR or NLMSG_DONE type but they are valid responses. We test 'multi-partness' by looking for NLM_F_MULTI flag.
This commit is contained in:
parent
4eac55238f
commit
131e7245a8
@ -394,7 +394,9 @@ virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
|
||||
break;
|
||||
|
||||
default:
|
||||
goto malformed_resp;
|
||||
/* We allow multipart messages. */
|
||||
if (!(resp->nlmsg_flags & NLM_F_MULTI))
|
||||
goto malformed_resp;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user