From nobody Fri Feb 03 19:34:19 2023 X-Original-To: dev-commits-src-main@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 4P7m7H6qZfz3kg9P; Fri, 3 Feb 2023 19:34:19 +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 4P7m7H4ndGz4QkJ; Fri, 3 Feb 2023 19:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675452859; 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=NthoKb1Ce3KYmUBXxnIQdO8TdIbv3QcPf4fAkzPHm94=; b=B4MNho9y96vx3aJbLGaYUN1D+fhdNQ+bwNW8vF7MVz+UAhNV/pzSfpF/Shw0l/TBlnLJgM 05mWWhjtK2MVcFRywql2qNLEnsIoPD3COZ/gN/lEQpcFOQKn3h5O11Uyq8Ib7jWn68mWLd cCslc7jUg+tF0Sf+v44gam7nNjzEHJ1BvqQQPlx9HvqL2uGGgq4LMWdEziuxzbTZRYRJNk JIIfRHEb/fz6Oxwd3DhlQONoRXX0RUAMnIYnZBftkhgXhowZitvjQL+MQLcS6cCCkBV2+g 3PmB3+n6DVV2VspCmF8vmj6bpSR/5aBkzpuja16BVp3xQ1wZwgaFLLfg5B3cvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675452859; 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=NthoKb1Ce3KYmUBXxnIQdO8TdIbv3QcPf4fAkzPHm94=; b=wCTvrfiVaNxSRZK7WCcmJNKNgo4MtTFC3Fv5Sym58qLS66K/NPLaMlBChDN70+Z4Iw4Amj wbcWQcJx9XlsCtRFtbNuiCX/SPU1Xs1FIdLOSQekoTvEufmqT0qHhBK0aJV5HLsJqkk7ck vvllaIoKWz2500AA55hGhlMW8Bo/4PDCnrZ6ODeA/PLZhJN/WCHwjIMschAyAycNR2OA06 W4Z2zu7WFKCRwmYxf7JmeyvemH87y/reb0elikm4+9VQ3a9Q82nMlbFYs9mKbG0DADmrlR c0y5tS0COwyDxhmJ1vE+1xkDUtQYjY5/ttFsxc/5wM0MhFEp+zLiLfK5LtQCzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675452859; a=rsa-sha256; cv=none; b=fLWPul3r1qWAal5fcjjj578cpB3kiiswYAqUQ34DnvUnGdrauwsyEV1U/3OEmghYMQW8Vj /eyeh1TKJQqhQ5Qm5ScWEHC1gnkFTz1GfS1GlIlUyx2ft2f3CI9B+vCzI4i3hwDWAPSMWR KnLPHiyIT0MlBXYNU3luis0NIq11bUnoYAFqBBa89CFdBxosaF6xVLk4KTPcSw1HX5orep 5tvqIdEJF7HHY/19jRLlQx2IQel36YnKdR3LrmNBT4cPGMWHrsUIHKrwLRJdBzoI5Hoyi2 bcZdoNqxYHF8Z31PvWXZbR6FT4GJNpJLW4pwsAITTSE0lBhE5/wJw9i+CxcUzw== 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 4P7m7H3sZJzmWD; Fri, 3 Feb 2023 19:34:19 +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 313JYJn1041389; Fri, 3 Feb 2023 19:34:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 313JYJ6Z041388; Fri, 3 Feb 2023 19:34:19 GMT (envelope-from git) Date: Fri, 3 Feb 2023 19:34:19 GMT Message-Id: <202302031934.313JYJ6Z041388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 221b9e3d0684 - main - inpcb: merge two versions of in6_pcbconnect() into one List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 221b9e3d06847afa199423bcaf59fc289998a452 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=221b9e3d06847afa199423bcaf59fc289998a452 commit 221b9e3d06847afa199423bcaf59fc289998a452 Author: Gleb Smirnoff AuthorDate: 2023-02-03 19:33:35 +0000 Commit: Gleb Smirnoff CommitDate: 2023-02-03 19:33:35 +0000 inpcb: merge two versions of in6_pcbconnect() into one No functional change. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D38354 --- sys/netinet/tcp_syncache.c | 4 ++-- sys/netinet/tcp_usrreq.c | 2 +- sys/netinet6/in6_pcb.c | 11 ++--------- sys/netinet6/in6_pcb.h | 4 +--- sys/netinet6/udp6_usrreq.c | 2 +- 5 files changed, 7 insertions(+), 16 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 1a4cde642d4a..2b817fee7260 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -882,8 +882,8 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) inp->in6p_laddr = sc->sc_inc.inc6_laddr; INP_HASH_WLOCK(&V_tcbinfo); - error = in6_pcbconnect_mbuf(inp, (struct sockaddr *)&sin6, - thread0.td_ucred, m, false); + error = in6_pcbconnect(inp, (struct sockaddr *)&sin6, + thread0.td_ucred, false); INP_HASH_WUNLOCK(&V_tcbinfo); if (error != 0) { inp->in6p_laddr = laddr6; diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 8cc5894171de..5d82e5138538 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1476,7 +1476,7 @@ tcp6_connect(struct tcpcb *tp, struct sockaddr *nam, struct thread *td) INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK(&V_tcbinfo); - error = in6_pcbconnect(inp, nam, td->td_ucred); + error = in6_pcbconnect(inp, nam, td->td_ucred, true); INP_HASH_WUNLOCK(&V_tcbinfo); if (error != 0) return (error); diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 51d29399e99b..aed0f26f89ba 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -414,8 +414,8 @@ in6_pcbladdr(struct inpcb *inp, struct sockaddr_in6 *sin6, * then pick one. */ int -in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, - struct ucred *cred, struct mbuf *m, bool rehash) +in6_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred, + bool rehash) { struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; @@ -497,13 +497,6 @@ in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, return (0); } -int -in6_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred) -{ - - return (in6_pcbconnect_mbuf(inp, nam, cred, NULL, true)); -} - void in6_pcbdisconnect(struct inpcb *inp) { diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index 09907e2c397c..bf84576736e4 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -74,9 +74,7 @@ void in6_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); void in6_losing(struct inpcb *); int in6_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); -int in6_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); -int in6_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, - struct ucred *, struct mbuf *, bool); +int in6_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *, bool); void in6_pcbdisconnect(struct inpcb *); struct inpcb * in6_pcblookup_local(struct inpcbinfo *, diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index b79a00280110..1ab838d60ac0 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1182,7 +1182,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; INP_HASH_WLOCK(pcbinfo); - error = in6_pcbconnect(inp, nam, td->td_ucred); + error = in6_pcbconnect(inp, nam, td->td_ucred, true); INP_HASH_WUNLOCK(pcbinfo); /* * If connect succeeds, mark socket as connected. If