Skip to content

Commit

Permalink
tools: hv: daemon should check type of received Netlink msg
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thozza authored and gregkh committed Mar 15, 2013
1 parent f4685fa commit 75db601
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/hv/hv_kvp_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,10 @@ int main(void)
}

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);
hv_msg = (struct hv_kvp_msg *)incoming_cn_msg->data;

Expand Down

0 comments on commit 75db601

Please sign in to comment.