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
This commit is contained in:
parent
673e07d5e7
commit
087aa087d5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172306
@ -668,8 +668,6 @@ print_newports(ipfw_insn_u16 *cmd, int proto, int opcode)
|
|||||||
int i;
|
int i;
|
||||||
char const *sep;
|
char const *sep;
|
||||||
|
|
||||||
if (cmd->o.len & F_NOT)
|
|
||||||
printf(" not");
|
|
||||||
if (opcode != 0) {
|
if (opcode != 0) {
|
||||||
sep = match_value(_port_name, opcode);
|
sep = match_value(_port_name, opcode);
|
||||||
if (sep == NULL)
|
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);
|
show_prerequisites(&flags, HAVE_PROTO|HAVE_SRCIP, 0);
|
||||||
if ((cmd->len & F_OR) && !or_block)
|
if ((cmd->len & F_OR) && !or_block)
|
||||||
printf(" {");
|
printf(" {");
|
||||||
|
if (cmd->len & F_NOT)
|
||||||
|
printf(" not");
|
||||||
print_newports((ipfw_insn_u16 *)cmd, proto,
|
print_newports((ipfw_insn_u16 *)cmd, proto,
|
||||||
(flags & HAVE_OPTIONS) ? cmd->opcode : 0);
|
(flags & HAVE_OPTIONS) ? cmd->opcode : 0);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user