summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw
diff options
context:
space:
mode:
authormelifaro <melifaro@FreeBSD.org>2014-08-14 17:31:04 +0000
committermelifaro <melifaro@FreeBSD.org>2014-08-14 17:31:04 +0000
commit9b0fd0e183ac89b59b7e15b147128e0267834cf2 (patch)
treefbbae11e9ac1595d370353e27fc85bb78a5ca9a4 /sbin/ipfw
parenta5e98ab07dc9b8eda689dbd99ddc1be8b569907f (diff)
downloadFreeBSD-src-9b0fd0e183ac89b59b7e15b147128e0267834cf2.zip
FreeBSD-src-9b0fd0e183ac89b59b7e15b147128e0267834cf2.tar.gz
* Document internal commands.
* Do not require/set default table type if algo name is specified. * Add TA_FLAG_READONLY option for algorithms.
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw.821
-rw-r--r--sbin/ipfw/tables.c10
2 files changed, 27 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8
index 9647697..6584bdb 100644
--- a/sbin/ipfw/ipfw.8
+++ b/sbin/ipfw/ipfw.8
@@ -113,6 +113,11 @@ in-kernel NAT.
.Oc
.Oc
.Ar pathname
+.Ss INTERNAL DIAGNOSTICS
+.Nm
+.Cm internal iflist
+.Nm
+.Cm internal talist
.Sh DESCRIPTION
The
.Nm
@@ -3181,6 +3186,22 @@ Controls whether bridged packets are passed to
.Nm .
Default is no.
.El
+.Sh INTERNAL DIAGNOSTICS
+There are some commands that may be useful to understand current state
+of certain subsystems inside kernel module.
+These commands provide debugging output which may change without notice.
+.Pp
+Currently the following commands are available as
+.Cm internal
+sub-options:
+.Bl -tag -width indent
+.It Cm iflist
+Lists all interface which are currently tracked by
+.Nm
+with their in-kernel status.
+.It Cm talist
+List all table lookup algorithms currently available.
+.El
.Sh EXAMPLES
There are far too many possible uses of
.Nm
diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c
index b90b46f..db88f30 100644
--- a/sbin/ipfw/tables.c
+++ b/sbin/ipfw/tables.c
@@ -391,10 +391,6 @@ table_create(ipfw_obj_header *oh, int ac, char *av[])
sz = sizeof(tbuf);
memset(&xi, 0, sizeof(xi));
- /* Set some defaults to preserve compability */
- xi.type = IPFW_TABLE_CIDR;
- xi.vtype = IPFW_VTYPE_U32;
-
while (ac > 0) {
tcmd = get_token(tablenewcmds, *av, "option");
ac--; av++;
@@ -464,6 +460,12 @@ table_create(ipfw_obj_header *oh, int ac, char *av[])
}
}
+ /* Set some defaults to preserve compability */
+ if (xi.algoname[0] == '\0' && xi.type == 0)
+ xi.type = IPFW_TABLE_CIDR;
+ if (xi.vtype == 0)
+ xi.vtype = IPFW_VTYPE_U32;
+
if ((error = table_do_create(oh, &xi)) != 0)
err(EX_OSERR, "Table creation failed");
}
OpenPOWER on IntegriCloud