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:
Maxim Perevedentsev 2015-10-20 18:44:19 +03:00 committed by Laine Stump
parent 4eac55238f
commit 131e7245a8

View File

@ -394,6 +394,8 @@ virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
break;
default:
/* We allow multipart messages. */
if (!(resp->nlmsg_flags & NLM_F_MULTI))
goto malformed_resp;
}