Fix output formatting of O_UNREACH6 opcode.

Obtained from:	Yandex LLC
This commit is contained in:
Andrey V. Elsukov 2016-04-14 18:22:08 +00:00
parent ce2761f128
commit 7b34dbe450
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297981
3 changed files with 5 additions and 5 deletions

View File

@ -1484,7 +1484,7 @@ show_static_rule(struct cmdline_opts *co, struct format_opts *fo,
if (cmd->arg1 == ICMP6_UNREACH_RST)
bprintf(bp, "reset6");
else
print_unreach6_code(cmd->arg1);
print_unreach6_code(bp, cmd->arg1);
break;
case O_SKIPTO:

View File

@ -329,7 +329,7 @@ void dummynet_flush(void);
int ipfw_delete_pipe(int pipe_or_queue, int n);
/* ipv6.c */
void print_unreach6_code(uint16_t code);
void print_unreach6_code(struct buf_pr *bp, uint16_t code);
void print_ip6(struct buf_pr *bp, struct _ipfw_insn_ip6 *cmd, char const *s);
void print_flow6id(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd);
void print_icmp6types(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd);

View File

@ -71,14 +71,14 @@ fill_unreach6_code(u_short *codep, char *str)
}
void
print_unreach6_code(uint16_t code)
print_unreach6_code(struct buf_pr *bp, uint16_t code)
{
char const *s = match_value(icmp6codes, code);
if (s != NULL)
printf("unreach6 %s", s);
bprintf(bp, "unreach6 %s", s);
else
printf("unreach6 %u", code);
bprintf(bp, "unreach6 %u", code);
}
/*