summaryrefslogtreecommitdiff
path: root/usr.sbin/pppd
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-07-14 00:27:10 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-07-14 00:27:10 +0000
commit0e67b049852bbcfe1c12d08059f295f7711a0693 (patch)
treedc31e50ebad56fe145cd96d47616332ee15a5f4d /usr.sbin/pppd
parentdce0746176555e09623132c4d0535740ec089e1f (diff)
netbsd pr#2623: fix VJ compression and active filter, John Kohl
<jtk@kolvir.arlington.ma.us>
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r--usr.sbin/pppd/sys-bsd.c16
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;
}