Tools: hv: fix send/recv buffer allocation
commitb4919a5f95c09992f66d4b7cbe392c33731a5cec
authorOlaf Hering <olaf@aepfle.de>
Thu, 1 Aug 2013 12:34:26 +0000 (1 14:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2013 03:44:18 +0000 (2 11:44 +0800)
tree2e5cece4cb4167d5e99e804cd10c54601ac3a1d0
parentcfc25993e81f3fa68481d062be634d33184d5eae
Tools: hv: fix send/recv buffer allocation

hv_kvp_daemon fails to start in current openSuSE 13.1 snapshots because
the kvp_send_buffer is too small to hold cn_msg+hv_kvp_msg, the very
first sendmsg returns with EFAULT. In addition it fixes the Network info
tab in Windows Server 2012R2 in SLES11.

Adjust the code in kvp and vss daemon to allocate the needed buffers at
runtime. To keep the code simple, the buffer_len includes also the
nlmsghdr, although only the recv_buffer needs this extra space.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_kvp_daemon.c
tools/hv/hv_vss_daemon.c