From nobody Tue Apr 14 22:18:02 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 4fwJZ21sdmz6ZWLQ for ; Tue, 14 Apr 2026 22:18:02 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fwJZ21FKRz3LDx for ; Tue, 14 Apr 2026 22:18:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776205082; 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=T01vuOceOdedZ/nojNZN8HxRhafM3YYs1excy3O9oL0=; b=ZC5zC7W6eBBfvdJqM0KzLdQnjUSn1bivdBQJWx4jds1tChGHkPdQI++EofM3MtFUq44TCy xLhGx5RFGmfnjoQTPP4oMtPU96+g0akwH9bRNKWnkDOe44d+m0ShE+enePRZxndsMwBeDi riFzQrQ3rzP/r7Cry+HiE1WLpIwLU/SCu9NRh30xBxUkYmYPIuFYN5bAA1en0/+Fq9P5fX sJhfIe/l1u5/UZgGqxGMawW0ZeCi/PuuiG2be3GqLm6WhARWSfR0v5S+TATuf98UeBEbHf rKFaNoTdPrwEZcA7/lE3MVBD/Ebc7zJeJw11uONY8uTctc/i4srKX3zQeSui6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776205082; a=rsa-sha256; cv=none; b=EQvSMjgM18w83XJP1syqJKjsEsgv63WWQkFO9WL4Pp+FnFoT8XxHV937LxOHvmvAU6zaNB I7+LwUK2DItmHvgper03DFBjmAevc8zgy4oquRcdZMqnSUP+X35qh+zmGI60SAT8cIkDsi CCuiZAbPEs2TkZNvjtYyKowRfDIz64OmJbYfGH8OJ9h6FK6mbHeXFCtICqr/J7hGb4eSMV e83IGgZnq/Bqusp35A6WsNgaxduR1E3LuUzzUAIvUUbh6ySAKty3PjMR7ZxkI7skAUFGxi kI82axXCNN5/pjRHdjwWkYeF1K+YAFBcoOIS7ar8YbNuIIwHbxYEv7fKERkhoQ== 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=1776205082; 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=T01vuOceOdedZ/nojNZN8HxRhafM3YYs1excy3O9oL0=; b=ZsGurHxwkVa9RQDM/FRMbwqC/R6KNlu3cYR8V3wzY0IC0qXoRFUYl2EREZtxU/pakoQ6Fe vvdeSZM34k1YtOdQzkkL8SL/ioZl4QfAc4tgUOBFD43ft14iOSqF5msHshYHJ8tgtXxNgL 1gX0uporAgERGwRkJ6IaHz9QT7gKWVioWDu5iJ/A+ZscZdh+P6b5qa3zZtCF9zL/dnDarz NOG/j5Lb1H38ffexl5BZk3Oy3N5zoOzfdEOa2yXYkejJW6suk2yP14DtU4vpl5iXr2T9KJ KlFqfLu+u/sg0hExv5oRrjgN5oIjpUaimLTGdzmMfAIKOCgVDfeL+aSxTf1IIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fwJZ20qbtz18DB for ; Tue, 14 Apr 2026 22:18:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2221b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 14 Apr 2026 22:18:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: bf41d86df0d9 - main - routing: Make ip[6]_tryforward() FIB-aware for local traffic 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: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf41d86df0d9dc4a1342c579f4e72db3c66b3443 Auto-Submitted: auto-generated Date: Tue, 14 Apr 2026 22:18:02 +0000 Message-Id: <69debd1a.2221b.394ee779@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=bf41d86df0d9dc4a1342c579f4e72db3c66b3443 commit bf41d86df0d9dc4a1342c579f4e72db3c66b3443 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-04-11 12:58:28 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-04-14 22:11:18 +0000 routing: Make ip[6]_tryforward() FIB-aware for local traffic `ip_tryforward()` and `ip6_tryforward()` checks whether the destination address is local or not without considering if it belongs to the current FIB. If the destination is local but not in our FIB, forward it instead of returning it to ip_input(). PR: 292319 Reviewed by: zlei MFC after: 1 week MFC to: stable/15 Differential Revision: https://reviews.freebsd.org/D56353 --- sys/netinet/ip_fastfwd.c | 4 ++-- sys/netinet6/ip6_fastfwd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 6001ce781bc8..d95cca490a5d 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -293,7 +293,7 @@ ip_tryforward(struct mbuf *m) /* * Is it for a local address on this host? */ - if (in_localip(ip->ip_dst)) + if (in_localip_fib(ip->ip_dst, M_GETFIB(m))) return m; IPSTAT_INC(ips_total); @@ -328,7 +328,7 @@ ip_tryforward(struct mbuf *m) /* * Is it now for a local address on this host? */ - if (in_localip(dest)) + if (in_localip_fib(dest, M_GETFIB(m))) goto forwardlocal; /* * Go on with new destination address diff --git a/sys/netinet6/ip6_fastfwd.c b/sys/netinet6/ip6_fastfwd.c index 9298b8ea9a49..8a288eb19891 100644 --- a/sys/netinet6/ip6_fastfwd.c +++ b/sys/netinet6/ip6_fastfwd.c @@ -113,7 +113,7 @@ ip6_tryforward(struct mbuf *m) IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src) || IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst) || IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) || - in6_localip(&ip6->ip6_dst)) + in6_localip_fib(&ip6->ip6_dst, M_GETFIB(m))) return (m); /* * Check that the amount of data in the buffers