From nobody Thu Nov 14 20:01:54 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 4Xq9z74XlPz5d5f1; Thu, 14 Nov 2024 20:01:55 +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 4Xq9z66vDjz43kj; Thu, 14 Nov 2024 20:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731614515; 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=pZANJTMSwOEzlXeDQhHa0zj1dJQ4fI4cl8drYHo1bso=; b=c8HWtHFQzmH1ArJTVfnCXjNfXlEBvxFdUmlKcQuVxTZPcC+z70kPUThZ4LueHeB2gi8/xd QfhwxWpDkBqi50gqqjLOnfBrU9mESp3bJFcqoErHZipE+tM7YlOpfEcXIqU45l554Y3eka 6TptWAKO8cZAw9MZYhZ4IbivuLc/ueZwTcSCYqV8NuLPe61k6ag3XZHehBYWJ+VpFfZDzF GE1DCXH8XlJYF8Z75QbYAAUrBob1H8wVn2LdobmBk55X7DhPozrmeoPOrMivd2b2cbk0US nHYnJtcDzI7Ok6OVeCD9WHFDUj6kcVjucC/Grbsp+Mm0O7Gr8fKz50wveg5+ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731614515; 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=pZANJTMSwOEzlXeDQhHa0zj1dJQ4fI4cl8drYHo1bso=; b=tNuLVKjsKFZ6JEePTkBknfc/40UwPq2E5DkkseGB7oeDMQnBk7uAuh3OvCLue3F5oWqa4a hCV2F8HoNtATpuBqdHRdtqRg4/V0J/nYx11jXGxK3ugHDlo8vDfVouJ+ZKEHpXV6Slypn6 /f8NI8rh+ELD8OYUuybf+rc2x1/5H4L6QUAjFTk+CArHSPqxS77PH5A0T+AlEkQdmUlVtw by7Ljg6f6JmAEjqQSBHNZ+SENgrnqJFC2TiREFlgR5zBvJ+5lzuEy2HaqzOGdiW0nrBbpZ bLQjfUcOo2qoX3FEsH98xwkoIVtn4nhXl93zURxiHRdFGVNjgfh3XUxXMLy7yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731614515; a=rsa-sha256; cv=none; b=diciqB7JL4yTTua8mKNkZGoebcK8EfxPOJuTEggjZ6NsPwrnqyY6eYAsZL+u0Nni8EcYUB 56wpBK9QMFkXKkChv1YUgoTTWi840rwhVNjhOH3qm6Rb7C/JVUpWcDvD95B8a6Lw5t1Nan xHFSPtGZKNCzERU8F47+Qco0E6C8pqw1L/W0clFIL4osTza6gD5gWsg/OFCH+teSKiLH29 mCVdkc9Snlk8k8UDAGcsTK6krzBa8esRRf6RmVMhAnNiqLGm8lfv8cL9LczQV10dN4mP0k n/mR+g2lMPZPu/vr+A5+KFldUlQB0SUZduwGjdgdfUJCsuv0wRZ/3BVSGC5Ohw== 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 4Xq9z66WRgzsLj; Thu, 14 Nov 2024 20:01:54 +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 4AEK1som077776; Thu, 14 Nov 2024 20:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEK1sXQ077773; Thu, 14 Nov 2024 20:01:54 GMT (envelope-from git) Date: Thu, 14 Nov 2024 20:01:54 GMT Message-Id: <202411142001.4AEK1sXQ077773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3bb15ffc4ab4 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3 commit 3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3 Author: Mark Johnston AuthorDate: 2024-11-14 19:20:21 +0000 Commit: Mark Johnston CommitDate: 2024-11-14 19:59:04 +0000 in6: Constify some sockaddr conversion functions No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield --- 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 dba1232fd58d..ffbe64f4de80 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2653,7 +2653,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)); @@ -2665,7 +2665,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 082e5f8990c9..effd33787e7e 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -677,9 +677,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); extern void addrsel_policy_init(void);