summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-06-18 16:12:17 +0000
committerderaadt <deraadt@openbsd.org>1996-06-18 16:12:17 +0000
commite23d95ef3971a3f4e1c5cf28dff08aee200b2442 (patch)
treef49015c0f8d404e7297c5dadb2f2c289816101d2
parentmove std stuff from rc.local to rc (diff)
downloadwireguard-openbsd-e23d95ef3971a3f4e1c5cf28dff08aee200b2442.tar.xz
wireguard-openbsd-e23d95ef3971a3f4e1c5cf28dff08aee200b2442.zip
bpf BIOCSRTIMEOUT can round tv_usec down to zero & block; netbsd pr#2531; jhawk@mit.edu
-rw-r--r--sys/net/bpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index de2153e75ed..a8992a36210 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.4 1996/05/10 12:31:05 deraadt Exp $ */
+/* $OpenBSD: bpf.c,v 1.5 1996/06/18 16:12:17 deraadt Exp $ */
/* $NetBSD: bpf.c,v 1.27 1996/05/07 05:26:02 thorpej Exp $ */
/*
@@ -751,6 +751,8 @@ bpfioctl(dev, cmd, addr, flag, p)
/* Compute number of ticks. */
d->bd_rtout = tv->tv_sec * hz + tv->tv_usec / tick;
+ if (d->bd_rtout == 0 && tv->tv_usec != 0)
+ d->bd_rtout = 1;
break;
}