From nobody Tue Apr 21 08:52:04 2026 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 4g0GLx72zwz6bS2t for ; Tue, 21 Apr 2026 08:52:09 +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 4g0GLx45J2z4NYS for ; Tue, 21 Apr 2026 08:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776761529; 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=kGPp7jM2ZkT27zAnvB7UY5zatNZTVkX+Dk6Rz1YuoLyZ0xflv0wxFndjldjPfKPEjaV3QV 1K3J//YeGOzPSGSkO3OCScPAUCsksQDyYmiHXxSEV8sISS9+LAG3BRePV7WLzGbwmrQygC Wk0KZGODOMSzi2+gZBEC3lE5zuABqYmrzGgdVi7tdRTH0rKKZaM8vXKYZ0cTRa0qVyZCQE kBrFyI28BHL6Wbm5wJ0xCf8/i7X1J4Qvw7yUjP6eKwOcw2833VpAzg+knwu/zPL5vDe24Z k2stwO3bgh/GlJ+QZ0Vo0tgRprOgT7Wa9/hXQNXRhQKwt66TnS0TrpZzgUgvOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776761529; a=rsa-sha256; cv=none; b=ncRyAlzkpaqCpyk41GOOWR6pMpvtrgjBPYkGZQFfRJKKqHDk385nSP99pQRFBCgzanXLqF qwDQFhVEvZK3FzATtj4LwgPkjeO9wlIQB8pbCUyiP+Jz8g/7DNov6cRhiwb0hhtxoS54HL Aqahc4aAHpYwK/h46Adpu2lyObHfZqGJMFmfcyIITg4/Zzb3ckkpz+fG9/L/+wyseFG1uy 8GLKdPwrisP5j5q8Pq41uphTr1L+GVepoM/V0uEL46VnPubfsfJ+3KlTPCnhrHodaxnhPa lWsgbq9+bz11+5t7B8uG8qZKcb7i0fm84rQQsJrE23XQ8LwgiwOJzyptBDTJAA== 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=1776761529; 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=s9tfAGcmqCtbn/gfGS/x6bsn9EETas3aWSZXoyjEXjvwXnu/Kuyff9t0gQJzOQIIMehUrN 77tqluu1+K5JhzmvQjaVop1in5cze17NJZlNKeGoTdzgeLD1lYPL5zDl4u88hfYKQN4lxA 4VMZk+qnk1TRoHUgEmUjmH9qui2e8yu4E7Ui54TkmUuRecDn+cctKAwsp55a2SU3OhPSWw /pHTD/WMUhdAOKD7pf8Vwx9IeotljnT7A/nMXKmnHYGaOJM1WRAP3ZHQZzQ8aSqeDhJ0Zp +sIUwRqIfd1XarxMqjxepHssh718q8UmyAX/9kD+YNewsxOHGBg7scZcxk7QaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0GLx3jBSzdVN for ; Tue, 21 Apr 2026 08:52:09 +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: 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: 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