Restore IPV6_NEXTHOP option support that seem was partially broken

since r286195.

Do not forget results of route lookup and initialize rt and ifp pointers.

PR:		238098
Submitted by:	Masse Nicolas <nicolas.masse at stormshield eu>
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2019-05-24 11:45:32 +00:00
parent 05ab1ef64e
commit b1536a812b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348236

View File

@ -724,6 +724,10 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
if (ron->ro_rt == NULL ||
(ron->ro_rt->rt_flags & RTF_GATEWAY) != 0)
error = EHOSTUNREACH;
else {
rt = ron->ro_rt;
ifp = rt->rt_ifp;
}
goto done;
}