summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/ipnat/ipnat.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sbin/ipnat/ipnat.c b/sbin/ipnat/ipnat.c
index a388f3bbb34..87eb0557398 100644
--- a/sbin/ipnat/ipnat.c
+++ b/sbin/ipnat/ipnat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipnat.c,v 1.29 1999/07/08 01:38:36 deraadt Exp $ */
+/* $OpenBSD: ipnat.c,v 1.30 1999/07/23 19:48:02 kjell Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
*
@@ -67,7 +67,7 @@ extern char *sys_errlist[];
#if !defined(lint)
static const char sccsid[] ="@(#)ipnat.c 1.9 6/5/96 (C) 1993 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ipnat.c,v 1.29 1999/07/08 01:38:36 deraadt Exp $";
+static const char rcsid[] = "@(#)$Id: ipnat.c,v 1.30 1999/07/23 19:48:02 kjell Exp $";
#endif
@@ -941,14 +941,15 @@ int opts;
if (*line)
fprintf(stderr, "%d: syntax error in \"%s\"\n",
linenum, line);
- } else if (!(opts & OPT_NODO)) {
- if ((opts & OPT_VERBOSE) && np)
- printnat(np, opts & OPT_VERBOSE, NULL);
- if (opts & OPT_REM) {
- if (ioctl(fd, SIOCADNAT, np) == -1)
- perror("ioctl(SIOCADNAT)");
- } else if (ioctl(fd, SIOCRMNAT, np) == -1)
- perror("ioctl(SIOCRMNAT)");
+ } else if ((opts & OPT_VERBOSE) && np) {
+ printnat(np, opts & OPT_VERBOSE, NULL);
+ if (!(opts & OPT_NODO)) {
+ if (opts & OPT_REM) {
+ if (ioctl(fd, SIOCADNAT, np) == -1)
+ perror("ioctl(SIOCADNAT)");
+ } else if (ioctl(fd, SIOCRMNAT, np) == -1)
+ perror("ioctl(SIOCRMNAT)");
+ }
}
linenum++;
}