diff options
author | 1996-07-14 00:27:09 +0000 | |
---|---|---|
committer | 1996-07-14 00:27:09 +0000 | |
commit | a3b54f77bf66d38abe773dc94e23a7e10b25f4a7 (patch) | |
tree | fe0d813a51f2afe5ab5818c4fba6fb247f917949 /usr.sbin/pppd/sys-bsd.c | |
parent | added missing plural (exist -> exists) (diff) | |
download | wireguard-openbsd-a3b54f77bf66d38abe773dc94e23a7e10b25f4a7.tar.xz wireguard-openbsd-a3b54f77bf66d38abe773dc94e23a7e10b25f4a7.zip |
netbsd pr#2623: fix VJ compression and active filter, John Kohl
<jtk@kolvir.arlington.ma.us>
Diffstat (limited to 'usr.sbin/pppd/sys-bsd.c')
-rw-r--r-- | usr.sbin/pppd/sys-bsd.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/pppd/sys-bsd.c b/usr.sbin/pppd/sys-bsd.c index d8891d71f41..5512f007ad5 100644 --- a/usr.sbin/pppd/sys-bsd.c +++ b/usr.sbin/pppd/sys-bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys-bsd.c,v 1.3 1996/04/21 23:41:29 deraadt Exp $ */ +/* $OpenBSD: sys-bsd.c,v 1.4 1996/07/14 00:27:09 downsj Exp $ */ /* * sys-bsd.c - System-dependent procedures for setting up @@ -23,7 +23,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: sys-bsd.c,v 1.3 1996/04/21 23:41:29 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: sys-bsd.c,v 1.4 1996/07/14 00:27:09 downsj Exp $"; #endif /* @@ -645,6 +645,7 @@ get_loop_output() { int rv = 0; int n; + struct ppp_idle idle; while ((n = read(loop_master, inbuf, sizeof(inbuf))) >= 0) { if (loop_chars(inbuf, n)) @@ -658,7 +659,16 @@ get_loop_output() syslog(LOG_ERR, "read from loopback: %m"); die(1); } - + if (get_idle_time(0, &idle)) { + /* somebody sent a packet which poked the active filter. */ + /* VJ compression may result in get_loop_output() never + matching the idle filter since it's applied here in user space + after the kernel has compressed the packet. + The kernel applies the active filter before the VJ compression. */ + if (idle.xmit_idle < idle_time_limit) + rv = 1; + SYSDEBUG((LOG_DEBUG, "xmit idle %d", idle.xmit_idle)); + } return rv; } |