summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>2000-06-18 02:48:19 +0000
committerbillf <billf@FreeBSD.org>2000-06-18 02:48:19 +0000
commita0d2bc60bbd1ae055e3dd6b9055ab44d547cf0c3 (patch)
tree063cefa5690df35c51556eaf7f5bfdf304cc1072 /sbin
parent4a7877f9e88a0fb91ab142195b282b3996abe6df (diff)
downloadFreeBSD-src-a0d2bc60bbd1ae055e3dd6b9055ab44d547cf0c3.zip
FreeBSD-src-a0d2bc60bbd1ae055e3dd6b9055ab44d547cf0c3.tar.gz
Reorder the "prob" section in the output of list/show so it can be copy/pasted
into add without problems. The previous commit had the other half of this original patch which handled tcpflags/tcpflgs confusion in output/input.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index aa79185..47a7289 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -217,6 +217,12 @@ show_ipfw(struct ip_fw *chain, int pcwidth, int bcwidth)
goto done ;
}
+ if (chain->fw_flg & IP_FW_F_RND_MATCH) {
+ double d = 1.0 * (int)(chain->pipe_ptr) ;
+ d = 1 - (d / 0x7fffffff) ;
+ printf("prob %f ", d);
+ }
+
switch (chain->fw_flg & IP_FW_F_COMMAND)
{
case IP_FW_F_ACCEPT:
@@ -260,11 +266,6 @@ show_ipfw(struct ip_fw *chain, int pcwidth, int bcwidth)
errx(EX_OSERR, "impossible");
}
- if (chain->fw_flg & IP_FW_F_RND_MATCH) {
- double d = 1.0 * (int)(chain->pipe_ptr) ;
- d = 1 - (d / 0x7fffffff) ;
- printf(" prob %f", d);
- }
if (chain->fw_flg & IP_FW_F_PRN) {
printf(" log");
if (chain->fw_logamount)
OpenPOWER on IntegriCloud