When I changed rt_ifp to no longer point to lo0 for RTF_LOCAL routes I
forgot the chunk below and introduced a regression.

Checking for (rt_ifp->if_flags & IFF_LOOPBACK) was the old way to check
for RTF_LOCAL.

ok?

Index: netinet6/in6_src.c
===================================================================
RCS file: /cvs/src/sys/netinet6/in6_src.c,v
retrieving revision 1.66
diff -u -p -r1.66 in6_src.c
--- netinet6/in6_src.c  24 Oct 2015 12:33:16 -0000      1.66
+++ netinet6/in6_src.c  24 Oct 2015 14:09:00 -0000
@@ -396,8 +396,8 @@ in6_selectroute(struct sockaddr_in6 *dst
                if (opts && opts->ip6po_pktinfo &&
                    opts->ip6po_pktinfo->ipi6_ifindex) {
                        if (ro->ro_rt != NULL &&
-                           (ro->ro_rt->rt_ifp->if_flags & IFF_LOOPBACK) == 0 &&
-                           ro->ro_rt->rt_ifp->if_index !=
+                           !ISSET(ro->ro_rt->rt_flags, RTF_LOCAL) &&
+                           ro->ro_rt->rt_ifidx !=
                            opts->ip6po_pktinfo->ipi6_ifindex) {
                                return (NULL);
                        }

Reply via email to