Skip to content

Commit 75db601

Browse files
thozzagregkh
authored andcommitted
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>
1 parent f4685fa commit 75db601

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tools/hv/hv_kvp_daemon.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,6 +1503,10 @@ int main(void)
15031503
}
15041504

15051505
incoming_msg = (struct nlmsghdr *)kvp_recv_buffer;
1506+
1507+
if (incoming_msg->nlmsg_type != NLMSG_DONE)
1508+
continue;
1509+
15061510
incoming_cn_msg = (struct cn_msg *)NLMSG_DATA(incoming_msg);
15071511
hv_msg = (struct hv_kvp_msg *)incoming_cn_msg->data;
15081512

0 commit comments

Comments
 (0)