From nobody Tue Apr 14 22:18:02 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 4fwJZ74nsnz6ZWLS for ; Tue, 14 Apr 2026 22:18:07 +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 4fwJZ73M1Rz3LQ9 for ; Tue, 14 Apr 2026 22:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776205087; 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=UbfzX6mduidUkE2SmEuITjPd/Z/3oJj59+DzN5DOZ9J2vLTOzDwkxWZ7riVaIYw+yBLJPy e52DswY6uiMdhNX53oWtpQDfKbAjhlLS2lNYXlZS9GoX25husWGfIuRzG9fDWLV5o9EhIZ BmLRnRti/fLF3qUZPmVvE0xrpHAwz5w9mb6C/nWVKUv9g0CUSv0eixzK9v4o324coI9wwB GxUKC4EOznVTDTbcMFuTplYp8p/3HePDCUlyxyZ0m6i9iWN/9npZlyD/9uhRiDk878GEFQ TyV5zhfQcHWpzH3nDPYD01FB7p5To/MtGBRFKGfKr5YHSPSPmMgaqodte3jAYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776205087; a=rsa-sha256; cv=none; b=cmPRMTB5iAe9O6THVnZqIEV9qNszSO+Vu3dhak1DAEpF13Gmg/zNE5YSd1I2q40kdqAXUR FIsiz3nskacCTw5KLq0GdwxWdNHu55VQ2I3lneBDpSbGco7FV/O8hn/HVjUMu9bq2cDD5J CPtm8PumtpFRj7bcDUxeZ9aYELd0sxNi8/ueQFI0KrbWVr6Wgev7k0fyv+gXaFtinviwYH 7CyOCTZby2/Rb9PIAzoW7Ae323+y+yj3W+6Hm65i8t5FEn4tGeuOOvL2Zx06iHxmLe3Np2 BIkj7m8xaR3Ov5soZev6bxNKZxTbrQb+63nca8csjzBk6wrwRznrHwLB3Kslqg== 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=1776205087; 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=BMUvNHpZDXFFO7Ng6auDzFsYuQ3uL5of7isClZe2eRUm/sdFquKFbRhMPmiPBhWZ5ACVJe 3US4B3L16xswvpRyorUv2aiFL8k7uw3/Sq2OLr2looVf5dZ/5SMWU7UdDibllLrSSdvUNc YpoL8fK6gcJgY9ih+ZyqWqDcILnAv8LI009O/7SvftjlvogRdNGoShYd056UaUmiMNY7AK rNSuBoylXQ1KGvBhpaRUeccJX5pV1LQNpj2LhG8733RSKuvKzKA4ZPRRlqfgof+SFdwN7R /p1BCK05M+F5N/DcJEXjOAXATs11l+HItWYPNnwH3gQYfGTAOD2RRKU9iJVW/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fwJZ72NGsz17ny for ; Tue, 14 Apr 2026 22:18:07 +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 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/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