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,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;