summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv/utilities/hv_shutdown.c
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-10-17 07:06:14 +0000
committersephe <sephe@FreeBSD.org>2016-10-17 07:06:14 +0000
commitbfcc3df58a4e625bd943c097338ca4435168ea69 (patch)
tree8e580b668bbcfd430e9ff32eb7ae8e5b8a42f11e /sys/dev/hyperv/utilities/hv_shutdown.c
parent9ca5f074e688a37f68b5b6c20786aacf041c3e97 (diff)
downloadFreeBSD-src-bfcc3df58a4e625bd943c097338ca4435168ea69.zip
FreeBSD-src-bfcc3df58a4e625bd943c097338ca4435168ea69.tar.gz
MFC 304730
hyperv/ic: Redefine IC version negotiate message. And stringent input IC version negotiate message checks. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7614
Diffstat (limited to 'sys/dev/hyperv/utilities/hv_shutdown.c')
-rw-r--r--sys/dev/hyperv/utilities/hv_shutdown.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/hyperv/utilities/hv_shutdown.c b/sys/dev/hyperv/utilities/hv_shutdown.c
index ea24e1b..042935c 100644
--- a/sys/dev/hyperv/utilities/hv_shutdown.c
+++ b/sys/dev/hyperv/utilities/hv_shutdown.c
@@ -85,7 +85,11 @@ hv_shutdown_cb(struct vmbus_channel *channel, void *context)
&buf[sizeof(struct hv_vmbus_pipe_hdr)];
if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) {
- hv_negotiate_version(icmsghdrp, buf);
+ int error;
+
+ error = vmbus_ic_negomsg(softc, buf, recv_len);
+ if (error)
+ return;
} else {
shutdown_msg =
(struct hv_vmbus_shutdown_msg_data *)
OpenPOWER on IntegriCloud