diff options
-rw-r--r-- | sbin/ipnat/ipnat.c | 5 | ||||
-rw-r--r-- | sbin/ipnat/natparse.c | 14 |
2 files changed, 9 insertions, 10 deletions
diff --git a/sbin/ipnat/ipnat.c b/sbin/ipnat/ipnat.c index 9a3b9db453b..b7a7a50230f 100644 --- a/sbin/ipnat/ipnat.c +++ b/sbin/ipnat/ipnat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipnat.c,v 1.39 2001/01/17 05:01:01 fgsch Exp $ */ +/* $OpenBSD: ipnat.c,v 1.40 2001/01/30 04:26:49 kjell Exp $ */ /* * Copyright (C) 1993-2000 by Darren Reed. @@ -43,7 +43,7 @@ #include <arpa/inet.h> #include <resolv.h> #include <ctype.h> -#include <netinet/ip_compat.h> +#include <netinet/ip_fil_compat.h> #include <netinet/ip_fil.h> #include <netinet/ip_proxy.h> #include <netinet/ip_nat.h> @@ -74,6 +74,7 @@ static char thishost[MAXHOSTNAMELEN]; extern char *optarg; +char *nlistf = NULL, *memf = NULL; extern ipnat_t *natparse __P((char *, int)); extern void natparsefile __P((int, char *, int)); extern void printnat __P((ipnat_t *, int, void *)); diff --git a/sbin/ipnat/natparse.c b/sbin/ipnat/natparse.c index fe7716983e0..e72f6adb0fc 100644 --- a/sbin/ipnat/natparse.c +++ b/sbin/ipnat/natparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: natparse.c,v 1.8 2001/01/23 02:24:12 fgsch Exp $ */ +/* $OpenBSD: natparse.c,v 1.9 2001/01/30 04:26:50 kjell Exp $ */ /* * Copyright (C) 1993-2000 by Darren Reed. @@ -41,7 +41,7 @@ #include <arpa/inet.h> #include <resolv.h> #include <ctype.h> -#include <netinet/ip_compat.h> +#include <netinet/ip_fil_compat.h> #include <netinet/ip_fil.h> #include <netinet/ip_proxy.h> #include <netinet/ip_nat.h> @@ -318,10 +318,6 @@ int linenum; return NULL; } - /* TCP only by default */ - ipn.in_flags |= IPN_TCP; - proto = "tcp"; - cpp++; strncpy(ipn.in_ifname, *cpp, sizeof(ipn.in_ifname) - 1); @@ -600,8 +596,10 @@ int linenum; return NULL; } else if (genmask("255.255.255.255", (u_32_t *)&ipn.in_inmsk)) return NULL; - if (*cpp) { - ipn.in_flags &= ~IPN_TCP; /* override default */ + if (!*cpp) { + ipn.in_flags |= IPN_TCP; /* XXX- TCP only by default */ + proto = "tcp"; + } else { if (!strcasecmp(*cpp, "tcp")) ipn.in_flags |= IPN_TCP; else if (!strcasecmp(*cpp, "udp")) |