From nobody Fri Nov 22 21:24:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xw7QN4kNfz5dPMB; Fri, 22 Nov 2024 21:24:12 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xw7QN46PXz4cpl; Fri, 22 Nov 2024 21:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z9sCAUyLyJEyVfzwGupVp2nk08vWcBLm8zUsibJhNQ8=; b=UZHnfwcKXFbYz9OWPwKweYgjLkRSMNmib3skOskLNPJT0Pmjgyzz2GmudfFRTksyjdxdvj rpt7O8TWCBC/+YoYGBhVpbVpKibycVu42tA5Nt7xTOXsr2lsOHl5Alpyd+w8XezHS1y/AK G5gbUhyRIGcagTwNVZyAb+/jmsH6Jhdubh7DGt84yx7A6fmJ7I8QtyaKRjrVRMGIaVOiQn HX+w3uCTHw+xq759ulSBQxFSIOK7YLJuyX3aMGr3J7BJMO+rI1Cw8BPtLMhUJgX5LB7AeL LOzE05rWk9vc7ZXbHVXqCLwOu/RhEi2QLQ/uu8MEjwJPx8Md131Wkp2c9YGb6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z9sCAUyLyJEyVfzwGupVp2nk08vWcBLm8zUsibJhNQ8=; b=ioeP5cG1bIDqrN+QAezpNzZay1eme/4VVQwjNO4235ApyEieYrFWSORZkR+jOgYA1AB4b6 pabmzL87fQ7wBHf+vNKqWKV5omFYZTFkR3gZ5vs46D3Nj1s/Z58rGqoeYZ7MeE3BaVizjR DOY8hhottsc/iI8bMYNyeYWACH5AgvUyHbrftAUKboCUz7OJGfeiKjQYtKfFs3ZqXMmF6g K2av8hWZlpHkLKRyBEUtuUX998WkFMFUnsJpx7hFYsfDzHfE7hN3OqU2cwC7j6MtzRW62I ubg21s+lx0k7idTCUyBvoS38DozuhUrm3j2/kvox5Hy+iIwZvTCGtddKfebaKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310652; a=rsa-sha256; cv=none; b=ul/ekRQKcd+me53VZpBQTbOnnnk7yU5CYeUh/vnAQCbkNrk+BfHh75xZyXjVimMZG3LQre 4V7x896wFv24CoYJRH541YlgyzV0m5mxoF2sEv6gBS3dsMyzXBHKvv4FMrE8bKuXU6KLEH 8+9D7O/WnLA981zjhV+YrKFsgpHy35eAgfsbtNapF2feUgycvOjE3Oy6dwTPM7mTcE9WO/ QhL4L2WnuVQNwX7p6Az/Uxab1jxgDeL7ikxaFaWWaUrQIXUgktjwltqlD2TaSeNHHlV0S5 wvuhgXpz6KQWjpBigex/H2iIzJk9oJo2lxkyYe6dszUnMuZYpfDzmBzEmtKO4w== 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 4Xw7QN3jmrzhJm; Fri, 22 Nov 2024 21:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AMLOCxS088327; Fri, 22 Nov 2024 21:24:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOCYi088324; Fri, 22 Nov 2024 21:24:12 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:12 GMT Message-Id: <202411222124.4AMLOCYi088324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9e67981e7855 - stable/14 - in6: Constify some sockaddr conversion functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e67981e7855bcaf50717491287b0ba8ea23495e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9e67981e7855bcaf50717491287b0ba8ea23495e commit 9e67981e7855bcaf50717491287b0ba8ea23495e Author: Mark Johnston AuthorDate: 2024-11-14 19:20:21 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 in6: Constify some sockaddr conversion functions No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit 3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3) --- sys/netinet6/in6.c | 4 ++-- sys/netinet6/in6.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index e9f16dcf5c54..54b9d598b961 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2655,7 +2655,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) * v4 mapped addr or v4 compat addr */ void -in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) +in6_sin6_2_sin(struct sockaddr_in *sin, const struct sockaddr_in6 *sin6) { bzero(sin, sizeof(*sin)); @@ -2667,7 +2667,7 @@ in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) /* Convert sockaddr_in to sockaddr_in6 in v4 mapped addr format. */ void -in6_sin_2_v4mapsin6(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) +in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, struct sockaddr_in6 *sin6) { bzero(sin6, sizeof(*sin6)); sin6->sin6_len = sizeof(struct sockaddr_in6); diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index ce3bbea6b8e6..0a4377638de1 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -679,9 +679,9 @@ extern void in6_if_up(struct ifnet *); struct sockaddr; void in6_sin6_2_sin(struct sockaddr_in *sin, - struct sockaddr_in6 *sin6); -void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, - struct sockaddr_in6 *sin6); + const struct sockaddr_in6 *sin6); +void in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, + struct sockaddr_in6 *sin6); void in6_sin6_2_sin_in_sock(struct sockaddr *nam); void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); extern void addrsel_policy_init(void);