git: 7753a59fdf19 - main - netinet6: Fix check for pktinfo outgoing ifindex in route cache

Pouria Mousavizadeh Tehrani <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7f79d2.3b645.32e86c30__1134.3418316514$1786739175$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by pouria:

URL: https://cgit.FreeBSD.org/src/commit/?id=7753a59fdf196fcbd8bb5706ad44bfc590bce0a9

commit 7753a59fdf196fcbd8bb5706ad44bfc590bce0a9
Author:     Pouria Mousavizadeh Tehrani <[email protected]>
AuthorDate: 2026-07-29 19:32:35 +0000
Commit:     Pouria Mousavizadeh Tehrani <[email protected]>
CommitDate: 2026-08-14 20:22:26 +0000

    netinet6: Fix check for pktinfo outgoing ifindex in route cache
    
    lookup_route is only called for outgoing traffic, therefore
    check nh_ifp index instead of nh_aifp as specified by RFC3542 sec 6.
    
    Differential Revision: https://reviews.freebsd.org/D58544
---
 sys/netinet6/in6_src.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 07e5b191afc2..1923908873f8 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -696,7 +696,7 @@ lookup_route(uint32_t fibnum, struct sockaddr_in6 *dst, struct route_in6 *ro,
 		 */
 		struct in6_pktinfo *pi;
 		if (opts && (pi = opts->ip6po_pktinfo) != NULL && pi->ipi6_ifindex) {
-			if (nh->nh_aifp->if_index != pi->ipi6_ifindex)
+			if (nh->nh_ifp->if_index != pi->ipi6_ifindex)
 				nh = NULL;
 		}
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.