summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2016-12-16 17:17:19 +0000
committerreyk <reyk@openbsd.org>2016-12-16 17:17:19 +0000
commit54c3cf97faff7557f327e1f3e38b88a090202f74 (patch)
tree7557603c05da8b7df0d048e713a0de25d39019a7
parentsync (diff)
downloadwireguard-openbsd-54c3cf97faff7557f327e1f3e38b88a090202f74.tar.xz
wireguard-openbsd-54c3cf97faff7557f327e1f3e38b88a090202f74.zip
When running on Azure, the initial timesync "sync" message is not correct,
ignore it and only use the timesync "sample" messages. OK mikeb@
-rw-r--r--sys/dev/pv/hypervic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/pv/hypervic.c b/sys/dev/pv/hypervic.c
index 9ced4846d85..079a8d27983 100644
--- a/sys/dev/pv/hypervic.c
+++ b/sys/dev/pv/hypervic.c
@@ -485,8 +485,7 @@ hv_timesync(void *arg)
break;
case VMBUS_ICMSG_TYPE_TIMESYNC:
msg = (struct vmbus_icmsg_timesync *)hdr;
- if (msg->ic_tsflags == VMBUS_ICMSG_TS_FLAG_SYNC ||
- msg->ic_tsflags == VMBUS_ICMSG_TS_FLAG_SAMPLE) {
+ if (msg->ic_tsflags == VMBUS_ICMSG_TS_FLAG_SAMPLE) {
microtime(&sc->sc_sensor.tv);
nanotime(&guest);
tns = (msg->ic_hvtime - 116444736000000000LL) * 100;