mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-30 16:51:41 +00:00
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:
parent
dd251c3820
commit
b2fa7d408d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57918
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user