From owner-svn-src-head@freebsd.org Thu Apr 14 18:22:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5BA2AEC51C; Thu, 14 Apr 2016 18:22:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6F3116B; Thu, 14 Apr 2016 18:22:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3EIM8D7088801; Thu, 14 Apr 2016 18:22:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3EIM8vu088797; Thu, 14 Apr 2016 18:22:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201604141822.u3EIM8vu088797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 Apr 2016 18:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297981 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 18:22:09 -0000 Author: ae Date: Thu Apr 14 18:22:08 2016 New Revision: 297981 URL: https://svnweb.freebsd.org/changeset/base/297981 Log: Fix output formatting of O_UNREACH6 opcode. Obtained from: Yandex LLC Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/ipv6.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Thu Apr 14 18:03:55 2016 (r297980) +++ head/sbin/ipfw/ipfw2.c Thu Apr 14 18:22:08 2016 (r297981) @@ -1484,7 +1484,7 @@ show_static_rule(struct cmdline_opts *co 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: Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Thu Apr 14 18:03:55 2016 (r297980) +++ head/sbin/ipfw/ipfw2.h Thu Apr 14 18:22:08 2016 (r297981) @@ -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); Modified: head/sbin/ipfw/ipv6.c ============================================================================== --- head/sbin/ipfw/ipv6.c Thu Apr 14 18:03:55 2016 (r297980) +++ head/sbin/ipfw/ipv6.c Thu Apr 14 18:22:08 2016 (r297981) @@ -71,14 +71,14 @@ fill_unreach6_code(u_short *codep, char } 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); } /*