diff options
author | Renato Botelho <renato@netgate.com> | 2018-05-18 14:53:44 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2018-05-18 14:53:44 -0300 |
commit | 64f021cd075bbcb3042539dcebc63e7d335ec2c0 (patch) | |
tree | 1a64375406a7b5976f98eaf4cf19f00cf2931dd1 /sbin/ipfw/ipfw2.c | |
parent | 8f29f1de284afe0ec8987780d5404a3e1a31712a (diff) | |
parent | eb64daea863b1fe3320e10c6c72cbfe7e9ce967b (diff) | |
download | FreeBSD-src-64f021cd075bbcb3042539dcebc63e7d335ec2c0.zip FreeBSD-src-64f021cd075bbcb3042539dcebc63e7d335ec2c0.tar.gz |
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 4f4a925..0c51845 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -1724,7 +1724,7 @@ print_instruction(struct buf_pr *bp, const struct format_opts *fo, static ipfw_insn * print_opcode(struct buf_pr *bp, struct format_opts *fo, - struct show_state *state, uint8_t opcode) + struct show_state *state, int opcode) { ipfw_insn *cmd; int l; @@ -1732,7 +1732,7 @@ print_opcode(struct buf_pr *bp, struct format_opts *fo, for (l = state->rule->act_ofs, cmd = state->rule->cmd; l > 0; l -= F_LEN(cmd), cmd += F_LEN(cmd)) { /* We use zero opcode to print the rest of options */ - if (opcode != 0 && cmd->opcode != opcode) + if (opcode >= 0 && cmd->opcode != opcode) continue; /* * Skip O_NOP, when we printing the rest @@ -2208,7 +2208,7 @@ show_static_rule(struct cmdline_opts *co, struct format_opts *fo, O_IP_DSTPORT, HAVE_DSTIP); /* Print the rest of options */ - while (print_opcode(bp, fo, &state, 0)) + while (print_opcode(bp, fo, &state, -1)) ; end: /* Print comment at the end */ |