Index: netinet/in_pcb.c =================================================================== RCS file: /cvs/src/sys/netinet/in_pcb.c,v diff -u -p -r1.314 in_pcb.c --- netinet/in_pcb.c 20 May 2025 05:51:43 -0000 1.314 +++ netinet/in_pcb.c 22 Jun 2025 00:21:13 -0000 @@ -1051,8 +1051,7 @@ in_pcbselsrc(struct in_addr *insrc, cons * - preferred source address is set * - output interface is UP */ - if (rt != NULL && !(rt->rt_flags & RTF_LLINFO) && - !(rt->rt_flags & RTF_HOST)) { + if (rt != NULL && ISSET(rt->rt_flags, RTF_GATEWAY)) { ip4_source = rtable_getsource(rtableid, AF_INET); if (ip4_source != NULL) { struct ifaddr *ifa; Index: netinet/ip_icmp.c =================================================================== RCS file: /cvs/src/sys/netinet/ip_icmp.c,v diff -u -p -r1.201 ip_icmp.c --- netinet/ip_icmp.c 20 Jun 2025 05:08:07 -0000 1.201 +++ netinet/ip_icmp.c 22 Jun 2025 00:21:13 -0000 @@ -749,7 +749,7 @@ icmp_reflect(struct mbuf *m, struct mbuf /* keep packet in the original virtual instance */ rt = rtalloc(sintosa(&sin), RT_RESOLVE, rtableid); if (rtisvalid(rt) && - ISSET(rt->rt_flags, RTF_LLINFO|RTF_HOST)) { + !ISSET(rt->rt_flags, RTF_GATEWAY)) { ia = ifatoia(rt->rt_ifa); ip_src = ia->ia_addr.sin_addr; } else { Index: netinet6/in6_src.c =================================================================== RCS file: /cvs/src/sys/netinet6/in6_src.c,v diff -u -p -r1.101 in6_src.c --- netinet6/in6_src.c 20 May 2025 05:51:43 -0000 1.101 +++ netinet6/in6_src.c 22 Jun 2025 00:21:13 -0000 @@ -204,8 +204,7 @@ in6_pcbselsrc(const struct in6_addr **in * - preferred source address is set * - output interface is UP */ - if (rt != NULL && !(rt->rt_flags & RTF_LLINFO) && - !(rt->rt_flags & RTF_HOST)) { + if (rt != NULL && ISSET(rt->rt_flags, RTF_GATEWAY)) { ip6_source = rtable_getsource(rtableid, AF_INET6); if (ip6_source != NULL) { struct ifaddr *ifa;