summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-18 16:12:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-18 16:12:18 +0000
commit5b9210134725c4a099ffacac330253c17a5b981a (patch)
tree083eff8dda47e02fc2579f50d8e34ff53dae4dbd /sys/net
parent6f7ed5262fa4ed1fc44c3b15743152faf3c32b57 (diff)
bpf BIOCSRTIMEOUT can round tv_usec down to zero & block; netbsd pr#2531; jhawk@mit.edu
Diffstat (limited to 'sys/net')
-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;
}