IPv6 needs scope_id for link-local addresses
This was accidentally deleted in
4df38f5bf9
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
5c94a07771
commit
e1ac4d7095
1 changed files with 5 additions and 0 deletions
|
@ -457,6 +457,11 @@ static dds_return_t ddsi_udp_create_conn (ddsi_tran_conn_t *conn_out, ddsi_tran_
|
||||||
ipv6 = true;
|
ipv6 = true;
|
||||||
if (bind_to_any)
|
if (bind_to_any)
|
||||||
socketname.a6.sin6_addr = ddsrt_in6addr_any;
|
socketname.a6.sin6_addr = ddsrt_in6addr_any;
|
||||||
|
if (IN6_IS_ADDR_LINKLOCAL (&socketname.a6.sin6_addr))
|
||||||
|
{
|
||||||
|
// A hack that only works if there is only a single interface in use
|
||||||
|
socketname.a6.sin6_scope_id = gv->interfaceNo;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue