From nobody Tue Apr 21 16:11:11 2026 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 4g0S5X1bWzz6YRNf for ; Tue, 21 Apr 2026 16:11: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0S5X0XQTz3gr6 for ; Tue, 21 Apr 2026 16:11:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787872; 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=69OWZ5nMUq3gEYstWGJF62G37eKfD+VQi3FUJylOx1Y=; b=X746Jo+A8L+Fdhy06ln9ApvTg5+LxZgOjJ6P/yFVGKRqFL0sAEdx/YAjTfL0wcu+h3zDwP Mcw9vLlCrFueMcDTsbxXbjbCt2PVfbOmVsAS9vNYGLIgsdO54AuA8F3y89gltOQm1zGseW AnXWLs//pNguLddj1Aw3KzKyxEW+t1xnRZXdDyk4Mqz1WwSsIx9FxDX8xqlQeRnyTwnaHH 03nrkQ/f5r7QrgV4YyglMdNziuNrlKPwTCBAnhwSRWHWULWUEESkMka0fuVwoQsjIIDY95 HGFO4G6a2WfBhQ4eUbJdMtaJLkMsyDLh/hg5mjepKt0PlIL3wnvFenEA0lyTZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776787872; a=rsa-sha256; cv=none; b=oPUeiu4MQDdS/eGbPRLWKnF46kdgVPv0OsDpKlBq2GcvuiOSKrnWLkfv/K0iZTcha+6Lgb COkvC8Hy51yqLlut67U1apv3BWy6IJR5BH7e5C6MgetPjrxRZBTBJ+374+mg6FhbBiljJB XBNicq4h4KZJxljFF0Pgsqzy2XRxzCEogjnVNQTvayWNLIZp53YSHFAsMhXGiWzpZ6kFP0 jw4DW4FKd1n9jvQcjoqHFbi92n1gT943kK/iVs3Cz8E0hD7lJo47XHRb/2lH5Xg119Qx9/ RIBme/CzGQnpXDQp2qQoDlIdnA39+UIQS1ahJLkm4T0qxjPxdRfHDkcz/782aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787872; 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=69OWZ5nMUq3gEYstWGJF62G37eKfD+VQi3FUJylOx1Y=; b=s5ozDSu4iRVRRGX5wOHXNM3SPZpMz8m8ErOZD75T5+NELI/0BOl3RL9zphZDw61EW/DyKr n13Cn99arD68mksKPiK2tav8+Y/y+4oyWfa6KmR1p34yWLJsBMHot+IO8RqKKlnuTVQ4Ez +lr8EoGnqHxi0agDMUOqqVhM2EwYvsxzQ0IvZNDmKTd6brYXSs/cozSx0GauvoNMUw9MMN COYvMQtG8ZtS7rgmv8/PxA+IG/HMG+/Bfzlu1CGYAWy6wVglZYF+c8zYDuL86C7XOJHwG7 cGXkIw23QRhfKpXtPh09MxD4GBCb6KexO3Ck1lyB8iWB6rWyRFnZrN/gTa/4WA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0S5W6zC7zrRL for ; Tue, 21 Apr 2026 16:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38d9c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 16:11:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 14a47a8bed87 - main - inpcb: remove always true condition in in_pcblookup_local() 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 14a47a8bed8758abd7ea6ced14e8a8d9bd2c97bc Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 16:11:11 +0000 Message-Id: <69e7a19f.38d9c.5facbaf4@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=14a47a8bed8758abd7ea6ced14e8a8d9bd2c97bc commit 14a47a8bed8758abd7ea6ced14e8a8d9bd2c97bc Author: Gleb Smirnoff AuthorDate: 2026-04-21 16:10:49 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-21 16:10:49 +0000 inpcb: remove always true condition in in_pcblookup_local() We are searching through the hash that has only wildcard bindings. This was missed by fdb987bebddf05e15a5af840379c7715a94aec1c. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56488 --- sys/netinet/in_pcb.c | 3 +-- sys/netinet6/in6_pcb.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 22c3287b93fd..3bb742f11c87 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2058,8 +2058,7 @@ in_pcblookup_local(struct inpcbinfo *pcbinfo, struct in_addr laddr, if ((inp->inp_vflag & INP_IPV4) == 0) continue; #endif - if (inp->inp_faddr.s_addr == INADDR_ANY && - inp->inp_laddr.s_addr == laddr.s_addr && + if (inp->inp_laddr.s_addr == laddr.s_addr && inp->inp_lport == lport && (fib == RT_ALL_FIBS || inp->inp_inc.inc_fibnum == fib)) { /* diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 3750c7040fbc..bbb7414a206d 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -753,8 +753,7 @@ in6_pcblookup_local(struct inpcbinfo *pcbinfo, const struct in6_addr *laddr, /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV6) == 0) continue; - if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) && - IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) && + if (IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) && inp->inp_lport == lport && (fib == RT_ALL_FIBS || inp->inp_inc.inc_fibnum == fib)) { /* Found. */