mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-13 05:41:26 +01:00
Fix output formatting of O_UNREACH6 opcode.
Obtained from: Yandex LLC
This commit is contained in:
parent
ce2761f128
commit
7b34dbe450
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297981
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user