diff options
author | brian <brian@FreeBSD.org> | 1997-12-28 02:46:26 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-12-28 02:46:26 +0000 |
commit | 2d964343409ebf259f7e998d52ce2eca7495c1a7 (patch) | |
tree | 63ff3ae0c2f7caba1390bdac6e4d031eee65179a | |
parent | 02739ba22b04044c41093fcccb060ade5fd414dd (diff) | |
download | FreeBSD-src-2d964343409ebf259f7e998d52ce2eca7495c1a7.zip FreeBSD-src-2d964343409ebf259f7e998d52ce2eca7495c1a7.tar.gz |
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.
-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 d3c9e6f..0c9df16 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.32 1997/11/22 03:37:33 brian Exp $ + * $Id: ip.c,v 1.33 1997/12/24 09:29:01 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 67e7c7e..4a9c677 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.111 1997/12/24 09:29:06 brian Exp $ + * $Id: main.c,v 1.112 1997/12/27 13:45:53 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 |