diff options
author | 2013-11-15 21:41:54 +0000 | |
---|---|---|
committer | 2013-11-15 21:41:54 +0000 | |
commit | d4ca8065ff9e61448f66eeaa06f6b71fac8eee22 (patch) | |
tree | 225a7ca3d2b1f527d333ab06c18ce10b5b78e7b5 | |
parent | Revert 1.858, as it causes panics of inp: (diff) | |
download | wireguard-openbsd-d4ca8065ff9e61448f66eeaa06f6b71fac8eee22.tar.xz wireguard-openbsd-d4ca8065ff9e61448f66eeaa06f6b71fac8eee22.zip |
calculate the line in the sand before comparing it to ticks, which looks
more like the original conditional.
if this doesnt fix rd thrushs panic, then this should be reverted to
r1.85.
-rw-r--r-- | sys/net/bpf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 332c72a4bda..9d704886e06 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.86 2013/11/12 01:12:09 dlg Exp $ */ +/* $OpenBSD: bpf.c,v 1.87 2013/11/15 21:41:54 dlg Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -1423,7 +1423,7 @@ bpf_catchpacket(struct bpf_d *d, u_char *pkt, size_t pktlen, size_t snaplen, } if (d->bd_fbuf && d->bd_rdStart && - (ticks - d->bd_rdStart > d->bd_rtout)) { + (ticks - (d->bd_rtout + d->bd_rdStart) > 0)) { /* * we could be selecting on the bpf, and we * may have timeouts set. We got here by getting |