Add an scope index embedded IPv6 link local addr creation support, by route
command. This is a workaround for some kernel interface which can't treat sin6_scope_id, yet.
This commit is contained in:
parent
dd85920a4f
commit
5dc2a47de7
@ -924,6 +924,10 @@ getaddr(which, s, hpp)
|
||||
exit(1);
|
||||
}
|
||||
bcopy(res->ai_addr, &su->sa, res->ai_addrlen);
|
||||
/* XXX: embedded link local addr check */
|
||||
if (IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr))
|
||||
*(u_short *)&su->sin6.sin6_addr.s6_addr[2] =
|
||||
ntohs(su->sin6.sin6_scope_id);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user