diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-25 13:55:52 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-25 13:55:52 +0000 |
commit | 0d170563d0a631fc221f1ee0ce7888bcc54eeaad (patch) | |
tree | 363f19197b091e5d41f9273e4a1928262e26fcf4 /sys/netinet6/in6_src.c | |
parent | 28f3ba26f7d7cfd4c02d95df70042a404e9ca73a (diff) |
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@
Diffstat (limited to 'sys/netinet6/in6_src.c')
-rw-r--r-- | sys/netinet6/in6_src.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |