svn commit: r302316 - head/sbin/ipfw

Andrey V. Elsukov ae at FreeBSD.org
Sat Jul 2 11:54:22 UTC 2016


Author: ae
Date: Sat Jul  2 11:54:20 2016
New Revision: 302316
URL: https://svnweb.freebsd.org/changeset/base/302316

Log:
  Hide warning about non-existent lookup tables and informational messages
  about modified table entry when quied mode enabled.
  
  Approved by:	re (hrs)
  Obtained from:	Yandex LLC

Modified:
  head/sbin/ipfw/tables.c

Modified: head/sbin/ipfw/tables.c
==============================================================================
--- head/sbin/ipfw/tables.c	Sat Jul  2 05:31:59 2016	(r302315)
+++ head/sbin/ipfw/tables.c	Sat Jul  2 11:54:20 2016	(r302316)
@@ -914,9 +914,10 @@ table_modify_record(ipfw_obj_header *oh,
 			xi.vmask = vmask;
 			strlcpy(xi.tablename, oh->ntlv.name,
 			    sizeof(xi.tablename));
-			fprintf(stderr, "DEPRECATED: inserting data into "
-			    "non-existent table %s. (auto-created)\n",
-			    xi.tablename);
+			if (quiet == 0)
+				warnx("DEPRECATED: inserting data into "
+				    "non-existent table %s. (auto-created)",
+				    xi.tablename);
 			table_do_create(oh, &xi);
 		}
 	
@@ -937,8 +938,6 @@ table_modify_record(ipfw_obj_header *oh,
 
 	error = table_do_modify_record(cmd, oh, tent_buf, count, atomic);
 
-	quiet = 0;
-
 	/*
 	 * Compatibility stuff: do not yell on duplicate keys or
 	 * failed deletions.


More information about the svn-src-head mailing list