Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2008 17:59:39 +0000 (UTC)
From:      Maxim Konovalov <maxim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r183890 - head/sbin/ipfw
Message-ID:  <200810141759.m9EHxdhc012624@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: maxim
Date: Tue Oct 14 17:59:39 2008
New Revision: 183890
URL: http://svn.freebsd.org/changeset/base/183890

Log:
  o Remove a debug code and restore an accidentally deleted code
  in a previous commit.

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==============================================================================
--- head/sbin/ipfw/ipfw2.c	Tue Oct 14 17:53:26 2008	(r183889)
+++ head/sbin/ipfw/ipfw2.c	Tue Oct 14 17:59:39 2008	(r183890)
@@ -3856,6 +3856,9 @@ nospace:
 }
 
 static void
+show_nat(int ac, char **av);
+
+static void
 print_nat_config(char *buf) {
 	struct cfg_nat *n;
 	int i, cnt, flag, off;
@@ -4063,6 +4066,11 @@ config_nat(int ac, char **av)
 	i = do_cmd(IP_FW_NAT_CFG, buf, off);
 	if (i)
 		err(1, "setsockopt(%s)", "IP_FW_NAT_CFG");
+
+	/* After every modification, we show the resultant rule. */
+	int _ac = 3;
+	char *_av[] = {"show", "config", id};
+	show_nat(_ac, _av);
 }
 
 static void
@@ -6054,7 +6062,6 @@ show_nat(int ac, char **av)
 		if (do_cmd(cmd, data, (uintptr_t)&nbytes) < 0)
 			err(EX_OSERR, "getsockopt(IP_FW_GET_%s)",
 			    (cmd == IP_FW_NAT_GET_LOG) ? "LOG" : "CONFIG");
-		printf("nbytes %b\n", nbytes);
 	}
 	if (nbytes == 0)
 		exit(0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810141759.m9EHxdhc012624>