mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
posix_sockets: use sin6_scope_id field to specify netif
This commit is contained in:
parent
499ffd6339
commit
356c8008dd
@ -238,6 +238,9 @@ static int _sockaddr_to_ep(const struct sockaddr *address, socklen_t address_len
|
||||
out->family = AF_INET6;
|
||||
memcpy(&out->addr.ipv6, &in6_addr->sin6_addr, sizeof(out->addr.ipv6));
|
||||
out->port = ntohs(in6_addr->sin6_port);
|
||||
if (in6_addr->sin6_scope_id != 0) {
|
||||
out->netif = (uint16_t) in6_addr->sin6_scope_id;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user