On 10/20/2015 11:44 AM, Maxim Perevedentsev wrote:
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.
ACK.
As I understand, this is required for the other patch to work, so I
pushed it first.
---
Difference to v1: fixed comment style.
src/util/virnetlink.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index 0276522..679b48e 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -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;
--
1.8.3.1
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list