diff options
author | phk <phk@FreeBSD.org> | 1996-04-02 11:43:28 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-04-02 11:43:28 +0000 |
commit | e9ce06f14dd5784611916d8dc02d26c3cb5e9beb (patch) | |
tree | 2a3b7cc7ae42b400dc6c2edfc998bc400bed8dbd /sbin | |
parent | e7c6a05609f34aff603f8c9e1ec7c5b691c7bf05 (diff) | |
download | FreeBSD-src-e9ce06f14dd5784611916d8dc02d26c3cb5e9beb.zip FreeBSD-src-e9ce06f14dd5784611916d8dc02d26c3cb5e9beb.tar.gz |
A couple of bug-fixes.
Reviewed by: phk
Submitted by: "Frank ten Wolde" <franky@pinewood.nl>
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/ipfw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index 77c3765..d6ed576 100644 --- a/sbin/ipfw/ipfw.c +++ b/sbin/ipfw/ipfw.c @@ -15,7 +15,7 @@ * * NEW command line interface for IP firewall facility * - * $Id: ipfw.c,v 1.20 1996/02/24 00:20:56 phk Exp $ + * $Id: ipfw.c,v 1.21 1996/02/24 13:39:46 phk Exp $ * */ @@ -175,7 +175,7 @@ show_ipfw(chain) comma = " "; for (i=0;i<chain->fw_ndp;i++) { printf("%s%d",comma,chain->fw_pts[chain->fw_nsp+i]); - if (i==chain->fw_nsp && (chain->fw_flg & IP_FW_F_DRNG)) + if (i==0 && (chain->fw_flg & IP_FW_F_DRNG)) comma = "-"; else comma = ","; @@ -281,7 +281,7 @@ show_usage(str) "\t\tlist [number]\n" "\t\tzero [number]\n" "\trule:\taction proto src dst extras...\n" -"\t\taction: {allow|deny|reject|count}[,log]\n" +"\t\taction: {allow|deny|reject|count} [log]\n" "\t\tproto: {ip|tcp|udp|icmp}}\n" "\t\tsrc: {any|ip[{/bits|:mask}]} [{port|port-port},...]\n" "\t\tdst: {any|ip[{/bits|:mask}]} [{port|port-port},...]\n" @@ -362,7 +362,7 @@ fill_port(cnt, ptr, off, av) sc = 0; i = 1; } - while (1) { + while (*av != NULL) { s = strchr(*av,','); if (s) { sc = *s; |