summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2021-03-26 17:40:03 +0000
committerderaadt <deraadt@openbsd.org>2021-03-26 17:40:03 +0000
commitb8c3aabe70e8dac5ac6da76a78ebdecfaed47ed4 (patch)
treeca24e9ac812ac45381f2ca54f969de0098f14229
parentSimplify argument parsing of vmctl stop (diff)
downloadwireguard-openbsd-b8c3aabe70e8dac5ac6da76a78ebdecfaed47ed4.tar.xz
wireguard-openbsd-b8c3aabe70e8dac5ac6da76a78ebdecfaed47ed4.zip
inspect all the packets to see if they are dhcp, not just the first one
in a ring bundle. ok florian
-rw-r--r--usr.sbin/vmd/virtio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/vmd/virtio.c b/usr.sbin/vmd/virtio.c
index 8800594fc61..1d269ed65ff 100644
--- a/usr.sbin/vmd/virtio.c
+++ b/usr.sbin/vmd/virtio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: virtio.c,v 1.82 2019/12/11 06:45:16 pd Exp $ */
+/* $OpenBSD: virtio.c,v 1.83 2021/03/26 17:40:03 deraadt Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -1404,7 +1404,6 @@ vionet_notify_tx(struct vionet_dev *dev)
vr = pkt = dhcppkt = NULL;
ret = spc = 0;
- dhcpsz = 0;
vr_sz = vring_size(VIONET_QUEUE_SIZE);
q_gpa = dev->vq[TXQ].qa;
@@ -1510,7 +1509,7 @@ vionet_notify_tx(struct vionet_dev *dev)
log_debug("vionet: wrong source address %s for vm %d",
ether_ntoa((struct ether_addr *)
eh->ether_shost), dev->vm_id);
- else if (dev->local && dhcpsz == 0 &&
+ else if (dev->local &&
(dhcpsz = dhcp_request(dev, pkt, pktsz, &dhcppkt)) != -1) {
log_debug("vionet: dhcp request,"
" local response size %zd", dhcpsz);