-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Description
The _ep_to_sockaddr()
function does not update IPv6's in6_addr->sin6_scope_id
with ep->netif
. If _sockaddr_to_ep()
function is later used for the same sockaddr, then out->netif
does get updated (unless sin6_scope_id
== 0), potentially with rubbish.
Steps to reproduce the issue
MODULE += posix_sockets
Use the getsockname()
or getpeername(
) functions and look at the sin6_scope_id
returned in the struct sockaddr_in6
structure.
Expected results
sin6_scope_id
contains the interface number, not some random values based on how the structure was initialized before the call.
ep_to_sockaddr()
function does update IPv6's in6_addr->sin6_scope_id
with ep->netif
.
Actual results
in6_addr->sin6_scope_id
ends up unchanged, possibly a random value, depending on how struct sockaddr *address
has been initialized.
Versions
Latest master (812c216)