Commit 75db6014 authored by Tomas Hozza's avatar Tomas Hozza Committed by Greg Kroah-Hartman

tools: hv: daemon should check type of received Netlink msg

HyperV KVP daemon should check nlmsg_type in received netlink message
header. If message type is NLMSG_DONE daemon can proceed with processing
otherwise it should wait for next message.
Signed-off-by: default avatarTomas Hozza <thozza@redhat.com>
Acked-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4685fa6
...@@ -1503,6 +1503,10 @@ int main(void) ...@@ -1503,6 +1503,10 @@ int main(void)
} }
incoming_msg = (struct nlmsghdr *)kvp_recv_buffer; incoming_msg = (struct nlmsghdr *)kvp_recv_buffer;
if (incoming_msg->nlmsg_type != NLMSG_DONE)
continue;
incoming_cn_msg = (struct cn_msg *)NLMSG_DATA(incoming_msg); incoming_cn_msg = (struct cn_msg *)NLMSG_DATA(incoming_msg);
hv_msg = (struct hv_kvp_msg *)incoming_cn_msg->data; hv_msg = (struct hv_kvp_msg *)incoming_cn_msg->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment