summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugh Graham <hugh@cvs.openbsd.org>1999-07-25 19:14:44 +0000
committerHugh Graham <hugh@cvs.openbsd.org>1999-07-25 19:14:44 +0000
commita78c457012d1efdd46d915a486032ed7a7764cac (patch)
tree291fe1fae9e2fc33f9df6ff887739f914362fad7
parentaf51ae98696a26b0c6112de4addce188f3738b58 (diff)
fix ipnat to not require -v
-rw-r--r--sbin/ipnat/ipnat.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/ipnat/ipnat.c b/sbin/ipnat/ipnat.c
index 87eb0557398..7e3272c0c59 100644
--- a/sbin/ipnat/ipnat.c
+++ b/sbin/ipnat/ipnat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipnat.c,v 1.30 1999/07/23 19:48:02 kjell Exp $ */
+/* $OpenBSD: ipnat.c,v 1.31 1999/07/25 19:14:43 hugh 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.30 1999/07/23 19:48:02 kjell Exp $";
+static const char rcsid[] = "@(#)$Id: ipnat.c,v 1.31 1999/07/25 19:14:43 hugh Exp $";
#endif
@@ -941,8 +941,9 @@ int opts;
if (*line)
fprintf(stderr, "%d: syntax error in \"%s\"\n",
linenum, line);
- } else if ((opts & OPT_VERBOSE) && np) {
- printnat(np, opts & OPT_VERBOSE, NULL);
+ } 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)