diff options
author | oleg <oleg@FreeBSD.org> | 2016-12-08 12:42:36 +0000 |
---|---|---|
committer | oleg <oleg@FreeBSD.org> | 2016-12-08 12:42:36 +0000 |
commit | 90c743f3a0dca085ad294f5f91ecea1d4c249791 (patch) | |
tree | d35fc56100422ae6f8ae03623c0aac30e5a13923 /sbin/ipfw | |
parent | d03230857f04c5f5b2ec57cdb334c51ac5794ef0 (diff) | |
download | FreeBSD-src-90c743f3a0dca085ad294f5f91ecea1d4c249791.zip FreeBSD-src-90c743f3a0dca085ad294f5f91ecea1d4c249791.tar.gz |
MFC r309281:
Fix 'ipfw delete set N':
do not emit meaningless 'rule 0 not found' warning if set was already empty.
Diffstat (limited to 'sbin/ipfw')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 6a69a43..5979f41 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -3194,7 +3194,7 @@ ipfw_delete(char *av[]) exitval = EX_UNAVAILABLE; warn("rule %u: setsockopt(IP_FW_XDEL)", rt.start_rule); - } else if (rt.new_set == 0) { + } else if (rt.new_set == 0 && do_set == 0) { exitval = EX_UNAVAILABLE; if (rt.start_rule != rt.end_rule) warnx("no rules rules in %u-%u range", |