From nobody Tue Apr 21 08:52:04 2026 X-Original-To: dev-commits-src-branches@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 4g0GLr3FPZz6bRrx for ; Tue, 21 Apr 2026 08:52:04 +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 4g0GLr2cnNz4Nkv for ; Tue, 21 Apr 2026 08:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776761524; 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=Mj8GKlB+fRIhMO2nAOUnwQJ7nx5J11zaR9G38Y9+Kq0=; b=USSRArssZWmZWspuxJlDJInijGgwCe9Z2nL/f8h5RILs2oaEjluBeFly5ZUTLsH6WHwTog a+2oaSq+YlIKG+mY8awGRLrh0p287Zgo08n8/fkVt2QXKGcNuIn4GsUhG+kb1P9sD1hVHU KWrZ8VvqXcoQhqBPUt3/IleBOXtca43l1DyRx9gdmFFv9c9Hkd8sYOosmRUmcpKGTuSAC3 UIfdcF9Z5uFBsZB/6Cwz6tBpxbmdUT1r+TBQ554Xr5bL3h1eePadgddSnvVpRkF0PN2+xt aZfHCX5OazI4PKXi/WJwRMcsknZeBS9hzHh/BYAUR7pb3CrcJ1qj36Q75KcVQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776761524; a=rsa-sha256; cv=none; b=X94pwOb12pqjiCR4Ls9e3953/tB8QPA72uSkwMIE9X9/98KwJ5sPDkWrmsIpzgrSGOrr6J rIECW14qNu4rfJ/MQUq+IZhUE0nKnbfFyzoeVo2mrKn6UrouiFr1OPsjSslNMq25PcKitO YB0yv/SsRoAk4IDeYo4T7gNejLzeVHF7FG2xzCgq0I5g6PsVZijuxTPwzxtr5eNGvj2aNl 4Ns31GroX0iqDWFQc9hbNizAiaPfnMgtc1uo7t/Jso2TL2fhx9FDfev0w9SSzZO9qKU5hW TICrPmW/MQPPc8NSb9V2H8ZgmFGpzVyd/8Ys0FnlEj+WQmhcjHJIO8rTdFZ53w== 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=1776761524; 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=Mj8GKlB+fRIhMO2nAOUnwQJ7nx5J11zaR9G38Y9+Kq0=; b=SnG6CNboLLPYdvE+9bGveToK3mzcjctSpv7eDbRv3IyyhJ021WBjNweaKaoM3KDs62c7qZ N4N3xBx9qEvk+J3zL+IpLieluh4zd2azdoGQRpaa2yZJX3UxOiA4f0SDE/4+zPbmRaCK/L 1N1BbMx3DsXxU9dqn9k4T113NfWlTUHliZVJiZcnLCuLraKxSBOZ3ykrZBJverTOseqV53 Ay/PzfNL5vGUTJdIE0CPw04gjZYB6q7TXXCUOr9wniCFQWCdmbtaquhfFUG8JQKfnyDDtd AJSK4kHbiuMnU4geLY4IIZ6o9rDLazZsiB4PGvbA91OFwDMAewZAp6LTeedcWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0GLr2BrPzd7b for ; Tue, 21 Apr 2026 08:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 321ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 08:52:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 43caeea1eac8 - stable/15 - routing: Make ip[6]_tryforward() FIB-aware for local traffic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 43caeea1eac8e8eaa2dd89479e5a699f786de88f Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 08:52:04 +0000 Message-Id: <69e73ab4.321ac.6e164e0c@gitrepo.freebsd.org> The branch stable/15 has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=43caeea1eac8e8eaa2dd89479e5a699f786de88f commit 43caeea1eac8e8eaa2dd89479e5a699f786de88f Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-04-11 12:58:28 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-04-21 08:50:36 +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 (cherry picked from commit bf41d86df0d9dc4a1342c579f4e72db3c66b3443) --- 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 51e7c2fbc4b0..c567d28f24f0 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -294,7 +294,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); @@ -329,7 +329,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 7139267722b7..8a8468ae7da6 100644 --- a/sys/netinet6/ip6_fastfwd.c +++ b/sys/netinet6/ip6_fastfwd.c @@ -114,7 +114,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