From 087aa087d5fcdd29b2a38b86566b491b717ad516 Mon Sep 17 00:00:00 2001 From: Maxim Konovalov Date: Sun, 23 Sep 2007 16:29:22 +0000 Subject: [PATCH] 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 --- sbin/ipfw/ipfw2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index a83cea06481f..f3ce06f5c8cd 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;