diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 95a96adb18b2..74198b63584f 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -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: diff --git a/sbin/ipfw/ipfw2.h b/sbin/ipfw/ipfw2.h index 86f2a41733f5..03c91e5672fd 100644 --- a/sbin/ipfw/ipfw2.h +++ b/sbin/ipfw/ipfw2.h @@ -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); diff --git a/sbin/ipfw/ipv6.c b/sbin/ipfw/ipv6.c index 36ee675bdf9a..c04dd702b93d 100644 --- a/sbin/ipfw/ipv6.c +++ b/sbin/ipfw/ipv6.c @@ -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); } /*