summaryrefslogtreecommitdiff
path: root/sbin/ipnat
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-06-23 17:02:44 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-06-23 17:02:44 +0000
commit2717db9aeac8e21d69e51ca2da57339745798e34 (patch)
treee5e09ae5fba984cf718d843fc3cbd99ece4cbc18 /sbin/ipnat
parent852af3074a568a03719d74b9262ee986c7356687 (diff)
use masks
Diffstat (limited to 'sbin/ipnat')
-rw-r--r--sbin/ipnat/ipnat.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/ipnat/ipnat.c b/sbin/ipnat/ipnat.c
index f0b52c5faf7..4fbba89efd9 100644
--- a/sbin/ipnat/ipnat.c
+++ b/sbin/ipnat/ipnat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipnat.c,v 1.15 1997/06/23 01:16:16 deraadt Exp $ */
+/* $OpenBSD: ipnat.c,v 1.16 1997/06/23 17:02:43 kstailey Exp $ */
/*
* (C)opyright 1993,1994,1995 by Darren Reed.
*
@@ -53,7 +53,7 @@
#if !defined(lint) && defined(LIBC_SCCS)
static char sccsid[] ="@(#)ipnat.c 1.9 6/5/96 (C) 1993 Darren Reed";
-static char rcsid[] = "Id: ipnat.c,v 2.0.1.7 1997/01/30 12:02:32 darrenr Exp";
+static char rcsid[] = "$DRId: ipnat.c,v 2.0.1.8 1997/02/16 21:23:40 darrenr Exp $";
#endif
#if SOLARIS
@@ -658,8 +658,12 @@ char *line;
ipn.in_pnext = portnum(tport, proto); /* target port */
s = NULL; /* That's all she wrote! */
}
+ ipn.in_inip &= ipn.in_inmsk;
+ ipn.in_outip &= ipn.in_outmsk;
+
if (!s)
return &ipn;
+
if (strcasecmp(s, "portmap")) {
fprintf(stderr, "expected \"portmap\" - got \"%s\"\n", s);
return NULL;