diff options
author | brian <brian@cvs.openbsd.org> | 1997-12-28 02:46:59 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1997-12-28 02:46:59 +0000 |
commit | 1114238242b38f9b4e02b087a3eff40b89ff9044 (patch) | |
tree | 602377889b4177f33d74699ae7050ba95c9de558 /usr.sbin | |
parent | c23e03e32d1e3e01b558ffc174d07f7d8241716c (diff) |
If a packet causes a dial, continue to test whether it's
blocked in the output filter. If so, proceed with the
dial despite dropping the packet.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/ip.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/main.c | 20 |
2 files changed, 7 insertions, 17 deletions
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c index 0bda3118a45..b2403fab5ed 100644 --- a/usr.sbin/ppp/ip.c +++ b/usr.sbin/ppp/ip.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ip.c,v 1.2 1997/12/24 09:30:34 brian Exp $ + * $Id: ip.c,v 1.3 1997/12/28 02:46:57 brian Exp $ * * TODO: * o Return ICMP message for filterd packet @@ -273,7 +273,7 @@ PacketCheck(char *cp, int nb, int direction) int logit, loglen; static char logbuf[200]; - logit = LogIsKept(LogTCPIP); + logit = LogIsKept(LogTCPIP) && direction != FL_DIAL; loglen = 0; pip = (struct ip *) cp; diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index 45565e4a646..fea52d6601b 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: main.c,v 1.8 1997/12/27 13:45:20 brian Exp $ + * $Id: main.c,v 1.9 1997/12/28 02:46:58 brian Exp $ * * TODO: * o Add commands for traffic summary, version display, etc. @@ -1098,20 +1098,10 @@ DoLoop(void) * Process on-demand dialup. Output packets are queued within tunnel * device until IPCP is opened. */ - if (LcpFsm.state <= ST_CLOSED && (mode & MODE_AUTO)) { - pri = PacketCheck(rbuff, n, FL_DIAL); - if (pri >= 0) { -#ifndef NOALIAS - if (mode & MODE_ALIAS) { - VarPacketAliasOut(rbuff, sizeof rbuff); - n = ntohs(((struct ip *) rbuff)->ip_len); - } -#endif - IpEnqueue(pri, rbuff, n); - dial_up = 1; /* XXX */ - } - continue; - } + if (LcpFsm.state <= ST_CLOSED && (mode & MODE_AUTO) && + (pri = PacketCheck(rbuff, n, FL_DIAL)) >= 0) + dial_up = 1; + pri = PacketCheck(rbuff, n, FL_OUT); if (pri >= 0) { #ifndef NOALIAS |