svn commit: r309713 - stable/11/sbin/ipfw

Oleg Bulyzhin oleg at FreeBSD.org
Thu Dec 8 12:42:37 UTC 2016


Author: oleg
Date: Thu Dec  8 12:42:36 2016
New Revision: 309713
URL: https://svnweb.freebsd.org/changeset/base/309713

Log:
  MFC r309281:
  
  Fix 'ipfw delete set N':
  do not emit meaningless 'rule 0 not found' warning if set was already empty.

Modified:
  stable/11/sbin/ipfw/ipfw2.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/ipfw/ipfw2.c
==============================================================================
--- stable/11/sbin/ipfw/ipfw2.c	Thu Dec  8 11:39:08 2016	(r309712)
+++ stable/11/sbin/ipfw/ipfw2.c	Thu Dec  8 12:42:36 2016	(r309713)
@@ -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",


More information about the svn-src-stable mailing list