aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Hozza <thozza@redhat.com>2013-03-13 09:14:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 14:23:16 -0400
commit75db601496e97ffa2476dcd00053c0ca95e977a5 (patch)
treebccdaff6af770f13cd04ee0fa79692a4549a6ec5
parentf4685fa6d0427c3948a5120a9658fad7ae81facd (diff)
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: Tomas Hozza <thozza@redhat.com> Acked-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--tools/hv/hv_kvp_daemon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 704a0f9a063d..5a1f6489d185 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -1503,6 +1503,10 @@ int main(void)
1503 } 1503 }
1504 1504
1505 incoming_msg = (struct nlmsghdr *)kvp_recv_buffer; 1505 incoming_msg = (struct nlmsghdr *)kvp_recv_buffer;
1506
1507 if (incoming_msg->nlmsg_type != NLMSG_DONE)
1508 continue;
1509
1506 incoming_cn_msg = (struct cn_msg *)NLMSG_DATA(incoming_msg); 1510 incoming_cn_msg = (struct cn_msg *)NLMSG_DATA(incoming_msg);
1507 hv_msg = (struct hv_kvp_msg *)incoming_cn_msg->data; 1511 hv_msg = (struct hv_kvp_msg *)incoming_cn_msg->data;
1508 1512