From: dv Date: Fri, 9 Feb 2024 14:52:39 +0000 (+0000) Subject: Only debug log dhcp packet info if packet is found. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=331823c886e35c7a44e9b2d514c83ef60d904f10;p=openbsd Only debug log dhcp packet info if packet is found. No functional change. vmd(8) was being chatty and incorrect. --- diff --git a/usr.sbin/vmd/vionet.c b/usr.sbin/vmd/vionet.c index 5ed06fb8a4c..6f4b741bd1f 100644 --- a/usr.sbin/vmd/vionet.c +++ b/usr.sbin/vmd/vionet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vionet.c,v 1.10 2024/02/05 21:58:09 dv Exp $ */ +/* $OpenBSD: vionet.c,v 1.11 2024/02/09 14:52:39 dv Exp $ */ /* * Copyright (c) 2023 Dave Voutila @@ -764,8 +764,9 @@ vionet_notify_tx(struct virtio_dev *dev) if (vionet->local) { dhcpsz = dhcp_request(dev, iov->iov_base, iov->iov_len, &dhcppkt); - log_debug("%s: detected dhcp request of %zu bytes", - __func__, dhcpsz); + if (dhcpsz > 0) + log_debug("%s: detected dhcp request of %zu bytes", + __func__, dhcpsz); } /* Write our packet to the tap(4). */