From nobody Fri Nov 22 21:24:13 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 4Xw7QP6R4Xz5dP3X; Fri, 22 Nov 2024 21:24:13 +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 4Xw7QP567Bz4cpm; Fri, 22 Nov 2024 21:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310653; 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=OOAe2+4E9iXezJNGt9QC6p/APKMa3OXF8b5u9sTuKKM=; b=AMwIjl6ZZlqXJVWeGqiQUfTZoFOH0oi83hXLCk4g5YYBSviQqo4KLmerzdEHhAkVF7jjN0 jUb0dahnwJsoQKkYIxqw9Y5lkTEZYB0Rl9OQA6JfWKu86vOJdIq4LBEO7BT6RdLk5RCFHL P/4EdZV099kzdXZaVRJkqvUm+EBMA0X1gourWj4++a47uRAwbJjaTKO2zr2RvQRubdOzXn zYxOYFtnNDCjv8ZhFTD8V6WLw0OXSrsJlHbv8oX3CGfMLgYkjLOHZjfrqUbpGHTsLQzIvG voxFx6fPKlxV+HjZUEHe42qgI6AzNCsaCZBMiHgwR1ir1lCuno3A0RftwAzYiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310653; 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=OOAe2+4E9iXezJNGt9QC6p/APKMa3OXF8b5u9sTuKKM=; b=Ag+Ii0XI76KFQrFx4UqmtNL8ptH5fbtauDqeDuJafIfcjjbXRB6kyHfaicD4uc4vqME+Ue 4JwSH5Zjv0TfL7fZQAKVP+WjvzutQ4MQuH942DM9fnHA7M3eIsSBrOfONPDh1bv5yQl0wF iixqYxqoW2Fv1TLWEn7Kdi0jYG8pj4q+0irs0ozbuN7fJRBUhvT8lJOQGI61RSWrojuIBu Q/JKfdSgC557FTd6S2wMnbbVyr4qJXyXRhMTdPfXfDZz6BgVa//c0zGpWZsaKIFAFuoPFK T1pkaZnrzNt2kWztZVBhK5fl9p0QNUmgP66ZoTKtL0jJDlUILGUCN8uhvlcn6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310653; a=rsa-sha256; cv=none; b=cv+zx+g5BFG7trQCyFLJOv7nskB8dd3adEwfuRfuYNuJqqkVd7ivebs+ZQC60jFr9mZ8kP xr8W5an72nnlRtRFYFZnHqzOQFUJbf0pdxpJkG00Qcrjndic0TdV1kaRfn+d9YAGX4CEOh NNgATSTHILuIVEvS3ifHe8nFhnQYH4ed1vTPkwt3n+QFvEHxwchUQ4eeAUtCxJ6KiVpZgH ikjONKc2a/ICizfTUebwrG8A/pDefJdSoL76IJ/oZA/r199x4753S0t4k2EWyhWLnfnEex 1dz4L+dWoFlq3abUcr1mZwVhkbDx1c3he8sB43zZvjl+5Vt8hchVWo1QZErcrQ== 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 4Xw7QP4jr2zgmm; Fri, 22 Nov 2024 21:24:13 +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 4AMLODIi088385; Fri, 22 Nov 2024 21:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOD7M088382; Fri, 22 Nov 2024 21:24:13 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:13 GMT Message-Id: <202411222124.4AMLOD7M088382@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: a525cdc39039 - stable/14 - inpcb: Constify address parameters to in6 pcb lookup routines 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: a525cdc39039f64687bcf2da3819ffd0f85e5e9e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a525cdc39039f64687bcf2da3819ffd0f85e5e9e commit a525cdc39039f64687bcf2da3819ffd0f85e5e9e Author: Mark Johnston AuthorDate: 2024-11-14 19:28:03 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 inpcb: Constify address parameters to in6 pcb lookup routines No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit 52ef944b0f6f1df8eebe1cb877c6aadb1c247da0) --- sys/netinet6/in6_pcb.c | 16 ++++++++-------- sys/netinet6/in6_pcb.h | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index f7f2ea0b8699..4c2c25bf691e 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -721,7 +721,7 @@ in6_pcbnotify(struct inpcbinfo *pcbinfo, struct sockaddr_in6 *sa6_dst, * hash lock. No inpcb locks or references are acquired. */ struct inpcb * -in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct in6_addr *laddr, +in6_pcblookup_local(struct inpcbinfo *pcbinfo, const struct in6_addr *laddr, u_short lport, int lookupflags, struct ucred *cred) { struct inpcb *inp; @@ -1184,9 +1184,9 @@ in6_pcblookup_hash(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, } static struct inpcb * -in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int lookupflags, - uint8_t numa_domain) +in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport_arg, const struct in6_addr *laddr, u_int lport_arg, + int lookupflags, uint8_t numa_domain) { struct inpcb *inp; const inp_lookup_t lockflags = lookupflags & INPLOOKUP_LOCKMASK; @@ -1246,8 +1246,8 @@ in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, * from which a pre-calculated hash value may be extracted. */ struct inpcb * -in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, - struct in6_addr *laddr, u_int lport, int lookupflags, +in6_pcblookup(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, struct ifnet *ifp __unused) { return (in6_pcblookup_hash_smr(pcbinfo, faddr, fport, laddr, lport, @@ -1255,8 +1255,8 @@ in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, } struct inpcb * -in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport, struct in6_addr *laddr, u_int lport, int lookupflags, +in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, struct ifnet *ifp __unused, struct mbuf *m) { return (in6_pcblookup_hash_smr(pcbinfo, faddr, fport, laddr, lport, diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index a11dbdb8c4d2..edf7023747bb 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -76,23 +76,17 @@ int in6_pcbbind(struct inpcb *, struct sockaddr_in6 *, struct ucred *); int in6_pcbconnect(struct inpcb *, struct sockaddr_in6 *, struct ucred *, bool); void in6_pcbdisconnect(struct inpcb *); -struct inpcb * - in6_pcblookup_local(struct inpcbinfo *, - struct in6_addr *, u_short, int, - struct ucred *); -struct inpcb * - in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, +struct inpcb *in6_pcblookup_local(struct inpcbinfo *, const struct in6_addr *, + u_short, int, struct ucred *); +struct inpcb *in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, u_int fport_arg, const struct in6_addr *laddr, u_int lport_arg, int lookupflags, uint8_t); -struct inpcb * - in6_pcblookup(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *); -struct inpcb * - in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *ifp, struct mbuf *); +struct inpcb *in6_pcblookup(struct inpcbinfo *, const struct in6_addr *, u_int, + const struct in6_addr *, u_int, int, struct ifnet *); +struct inpcb *in6_pcblookup_mbuf(struct inpcbinfo *, const struct in6_addr *, + u_int, const struct in6_addr *, u_int, int, struct ifnet *ifp, + struct mbuf *); void in6_pcbnotify(struct inpcbinfo *, struct sockaddr_in6 *, u_int, const struct sockaddr_in6 *, u_int, int, void *, struct inpcb *(*)(struct inpcb *, int));