summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1997-11-12 21:04:21 +0000
committerBrian Somers <brian@FreeBSD.org>1997-11-12 21:04:21 +0000
commita272e47d504257bb30e6fe4babcf3e4a9956734f (patch)
treec07873bb8f39c7815a2d4b1f7ac56d3083365a74
parent710e9c29700217907f716687e283466ddb21bde8 (diff)
Notes
-rw-r--r--usr.sbin/ppp/ip.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c
index c1c9484c865e..0fcddf9c4304 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.27 1997/10/26 12:42:10 brian Exp $
+ * $Id: ip.c,v 1.28 1997/11/12 19:48:45 brian Exp $
*
* TODO:
* o Return ICMP message for filterd packet
@@ -164,8 +164,10 @@ FilterCheck(struct ip * pip, int direction)
return (A_PERMIT);
}
LogPrintf(LogDEBUG, "rule = %d\n", n);
- if ((pip->ip_src.s_addr & fp->smask.s_addr) == fp->saddr.s_addr
- && (pip->ip_dst.s_addr & fp->dmask.s_addr) == fp->daddr.s_addr) {
+ if ((pip->ip_src.s_addr & fp->smask.s_addr) ==
+ (fp->saddr.s_addr & fp->smask.s_addr) &&
+ (pip->ip_dst.s_addr & fp->dmask.s_addr) ==
+ (fp->daddr.s_addr & fp->dmask.s_addr)) {
if (fp->proto) {
if (!gotinfo) {
ptop = (char *) pip + (pip->ip_hl << 2);