Date: Tue, 29 Nov 2016 10:43:58 +0000 (UTC) From: Oleg Bulyzhin <oleg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309281 - head/sbin/ipfw Message-ID: <201611291043.uATAhwPj000757@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: oleg Date: Tue Nov 29 10:43:58 2016 New Revision: 309281 URL: https://svnweb.freebsd.org/changeset/base/309281 Log: Fix 'ipfw delete set N': do not emit meaningless 'rule 0 not found' warning if set was already empty. MFC after: 1 week Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Tue Nov 29 08:20:55 2016 (r309280) +++ head/sbin/ipfw/ipfw2.c Tue Nov 29 10:43:58 2016 (r309281) @@ -3221,7 +3221,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",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611291043.uATAhwPj000757>