From owner-dev-commits-src-all@freebsd.org Tue Feb 16 21:12:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7246B54A1F7 for ; Tue, 16 Feb 2021 21:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgDFT2tYYz3R5F; Tue, 16 Feb 2021 21:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55FB3187A6; Tue, 16 Feb 2021 21:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11GLCTRQ017390; Tue, 16 Feb 2021 21:12:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GLCTd0017389; Tue, 16 Feb 2021 21:12:29 GMT (envelope-from git) Date: Tue, 16 Feb 2021 21:12:29 GMT Message-Id: <202102162112.11GLCTd0017389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Philip Paeps Subject: git: f28545524cb1 - releng/13.0 - ifconfig: fix incorrect wg allowed-ips netmask MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: f28545524cb197a5df9ebd8d2019f200801d538a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 21:12:29 -0000 The branch releng/13.0 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=f28545524cb197a5df9ebd8d2019f200801d538a commit f28545524cb197a5df9ebd8d2019f200801d538a Author: Michael Chiu AuthorDate: 2021-02-15 00:38:26 +0000 Commit: Philip Paeps CommitDate: 2021-02-16 21:11:45 +0000 ifconfig: fix incorrect wg allowed-ips netmask Currently when peer information is displayed with `ifconfig wgN peer ..` or `ifconfig wgN peer-list`, the netmask of the first `allowed-ips` will be used as the netmask of all CIDR in `allowed-ips`. For example, if the list is `192.168.1.0/24, 172.16.0.0/16`, it will display as `192.168.1.0/24, 172.16.0.0/24`. While this does not affect the actual functionality, it is very confusing. Submitted by: Michael Chiu Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D28655 Approved by: re (gjb) (cherry picked from commit be2003ccfa1b12f372fa1329c38c29fe035f232f) --- sbin/ifconfig/ifwg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifwg.c b/sbin/ifconfig/ifwg.c index 8956e3427dd1..a2b22d2dfbef 100644 --- a/sbin/ifconfig/ifwg.c +++ b/sbin/ifconfig/ifwg.c @@ -309,7 +309,7 @@ dump_peer(const nvlist_t *nvl_peer) sa = __DECONST(void *, &aips[i].a_addr); bitmask = __DECONST(void *, - ((const struct sockaddr *)&aips->a_mask)->sa_data); + ((const struct sockaddr *)&(&aips[i])->a_mask)->sa_data); family = aips[i].a_addr.ss_family; getnameinfo(sa, sa->sa_len, addr_buf, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST);