diff options
author | maxim <maxim@FreeBSD.org> | 2007-09-23 16:29:22 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2007-09-23 16:29:22 +0000 |
commit | 9f9cc8d8af1e3d0faf3aa8f6c33dcba894d564c6 (patch) | |
tree | 701805796f2dee101db1d1c5d7b49723563678b9 | |
parent | 816792f7c8f13822fd23158500cc30773e3b21b7 (diff) | |
download | FreeBSD-src-9f9cc8d8af1e3d0faf3aa8f6c33dcba894d564c6.zip FreeBSD-src-9f9cc8d8af1e3d0faf3aa8f6c33dcba894d564c6.tar.gz |
o Cosmetic: fix the issue when "ipfw(8) show" produces "not" twice:
$ ipfw -n add 1 allow layer2 not mac-type ip
00001 allow ip from any to any layer2 not not mac-type 0x0800
PR: bin/115372
Submitted by: Andrey V. Elsukov
Approved by: re (hrs)
MFC after: 3 weeks
-rw-r--r-- | sbin/ipfw/ipfw2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index a83cea0..f3ce06f 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -668,8 +668,6 @@ print_newports(ipfw_insn_u16 *cmd, int proto, int opcode) int i; char const *sep; - if (cmd->o.len & F_NOT) - printf(" not"); if (opcode != 0) { sep = match_value(_port_name, opcode); if (sep == NULL) @@ -1755,6 +1753,8 @@ show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth) show_prerequisites(&flags, HAVE_PROTO|HAVE_SRCIP, 0); if ((cmd->len & F_OR) && !or_block) printf(" {"); + if (cmd->len & F_NOT) + printf(" not"); print_newports((ipfw_insn_u16 *)cmd, proto, (flags & HAVE_OPTIONS) ? cmd->opcode : 0); break; |