Clear sin6_scope_id before passing routes into kernel, becaues kernel

don't support routes with sin6_scope_id set.
Without this fix, routes with IPv6 scoped addr won't work when it is
assigned by "route" command.

Approved by: jkh

Reviewed by: ume
This commit is contained in:
Yoshinobu Inoue 2000-03-11 20:52:01 +00:00
parent dd251c3820
commit b2fa7d408d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57918

View File

@ -928,6 +928,7 @@ getaddr(which, s, hpp)
if (IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr))
*(u_short *)&su->sin6.sin6_addr.s6_addr[2] =
ntohs(su->sin6.sin6_scope_id);
su->sin6.sin6_scope_id = 0;
return 0;
}
#endif