Check IPv6 scope on the matching NCD link

This commit is contained in:
evgeny committed 2026-10-24 20:15:30 +02:00
1 parent e137778ba2
commit 2a7266e17f
1 file changed
+3 -1
+3 -1
View File
@@ -294,7 +294,9 @@ static void ipv6_candidates(void) {
struct ETCP_CONN* conn = node_conn_direct_get_conn(handle); CHECK(link_count(conn) == 1);
sock->netif_index = 1;
CHECK(ncd_add_socket_links(inst, sock) == 1 && link_count(conn) == 2);
CHECK(((struct sockaddr_in6*)&conn->links->remote_addr)->sin6_scope_id == 1);
struct ETCP_LINK* link = conn->links;
while (link && ss_get_port(&link->remote_addr) != 10) link = link->next;
CHECK(link && ((struct sockaddr_in6*)&link->remote_addr)->sin6_scope_id == 1);
node_conn_direct_force_close(handle); teardown();
}