summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2008-01-20 08:31:35 +0000
committermaxim <maxim@FreeBSD.org>2008-01-20 08:31:35 +0000
commit3646748d3a5e87a887add01aa8e8876397b298c1 (patch)
tree5beb121df0225a14f3c6820103c08682359cf22e /sbin
parentef5ed15ee4290cbcbaa6908c000916bc6ee5b2a6 (diff)
downloadFreeBSD-src-3646748d3a5e87a887add01aa8e8876397b298c1.zip
FreeBSD-src-3646748d3a5e87a887add01aa8e8876397b298c1.tar.gz
o Fix ipfw(8) command line parser bug: "ipfw nat 1 config if" requires an argument.
PR: bin/119815 Submitted by: Dierk Sacher MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 335855f..11c78bf 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -3994,6 +3994,8 @@ config_nat(int ac, char **av)
ac--; av++;
break;
case TOK_IF:
+ if (ac == 0)
+ errx(EX_DATAERR, "missing option");
set_addr_dynamic(av[0], n);
ac--; av++;
break;
OpenPOWER on IntegriCloud