From: mpi Date: Sun, 25 Oct 2015 13:55:51 +0000 (+0000) Subject: Use the "modern" way to check if a route entry correspond to a local X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d90dc236725145b0ba6c0572d3170fcfb9be024b;p=openbsd Use the "modern" way to check if a route entry correspond to a local address. Fix a regression introduced when removing the lo0 hack. ok florian@ --- diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 5bf46970987..450c7a57693 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_src.c,v 1.68 2015/10/24 16:57:46 mpi Exp $ */ +/* $OpenBSD: in6_src.c,v 1.69 2015/10/25 13:55:51 mpi Exp $ */ /* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */ /* @@ -403,8 +403,8 @@ in6_selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, 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); }