Handle HAVE_PROTO flag and print "proto" keyword for O_IP4 and O_IP6
opcodes when it is needed. This should fix the problem, when printed by `ipfw show` rule could not be added due to missing "proto" keyword. MFC after: 2 weeks
This commit is contained in:
parent
90ecb41fba
commit
761618de05
@ -1701,9 +1701,13 @@ print_instruction(struct buf_pr *bp, const struct format_opts *fo,
|
||||
IPFW_TLV_STATE_NAME));
|
||||
break;
|
||||
case O_IP6:
|
||||
if (state->flags & HAVE_PROTO)
|
||||
bprintf(bp, " proto");
|
||||
bprintf(bp, " ip6");
|
||||
break;
|
||||
case O_IP4:
|
||||
if (state->flags & HAVE_PROTO)
|
||||
bprintf(bp, " proto");
|
||||
bprintf(bp, " ip4");
|
||||
break;
|
||||
case O_ICMP6TYPE:
|
||||
|
Loading…
Reference in New Issue
Block a user