diff options
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r-- | sys/netinet6/ip6_output.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index c48ac7b1594a..98875640e7a5 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -602,15 +602,12 @@ again: rt->rt_use++; } + /* * The outgoing interface must be in the zone of source and - * destination addresses. We should use ia_ifp to support the - * case of sending packets to an address of our own. + * destination addresses. */ - if (ia != NULL && ia->ia_ifp) - origifp = ia->ia_ifp; - else - origifp = ifp; + origifp = ifp; src0 = ip6->ip6_src; if (in6_setscope(&src0, origifp, &zone)) @@ -634,6 +631,12 @@ again: goto badscope; } + /* We should use ia_ifp to support the case of + * sending packets to an address of our own. + */ + if (ia != NULL && ia->ia_ifp) + ifp = ia->ia_ifp; + /* scope check is done. */ goto routefound; |