From 77afc5e63758e31bc89e584e9955bd8f3ba55370 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 23 May 2023 22:04:12 +0200 Subject: [PATCH] sys/posix/sockets: set sin6_scope_id in _ep_to_sockaddr() Fixes https://github.com/RIOT-OS/RIOT/issues/19486 --- sys/posix/sockets/posix_sockets.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/posix/sockets/posix_sockets.c b/sys/posix/sockets/posix_sockets.c index 437bccbfe1..3933f70a30 100644 --- a/sys/posix/sockets/posix_sockets.c +++ b/sys/posix/sockets/posix_sockets.c @@ -232,6 +232,7 @@ static int _ep_to_sockaddr(const struct _sock_tl_ep *ep, in6_addr->sin6_family = AF_INET6; memcpy(&in6_addr->sin6_addr, &ep->addr.ipv6, sizeof(ep->addr.ipv6)); in6_addr->sin6_port = htons(ep->port); + in6_addr->sin6_scope_id = ep->netif; return sizeof(struct sockaddr_in6); } #endif