lookup_route is only called for outgoing traffic, therefore
check nh_ifp index instead of nh_aifp as specified by RFC3542 sec 6.
Details
Details
Set your interface index on this test code:
https://people.freebsd.org/~pouria/ipv6_pktinfo_tcp_ifi.c
With wrong index:
[pouria@cornelia] [~/code/c] % ./ipv6_pktinfo_tcp_ifi connect: No route to host
With right one:
[pouria@cornelia] [~/code/c] % cc -o ipv6_pktinfo_tcp_ifi ipv6_pktinfo_tcp_ifi.c [pouria@cornelia] [~/code/c] % ./ipv6_pktinfo_tcp_ifi Connected successfully! Sent GET request Recv GET response HTTP/1.1 200 OK Date: Fri, 31 Jul 2026 19:20:38 GMT Content-Type: text/plain Content-Length: 36 Connection: close Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET ...
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 75279 Build 72162: arc lint + arc unit