From dd242cb9106c22ccc9309e9c15b3e6b79b2a5ccf Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 9 Oct 2024 01:24:56 +0200 Subject: socket: Remove greater-than check for scope_id since they might not be in order Otherwise the scope_id matching might exit the loop before reaching the interface with the actual corresponding scope_id. This only affected socket_connect_addr(). --- src/socket.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/socket.c b/src/socket.c index 3375e5b..6e65c42 100644 --- a/src/socket.c +++ b/src/socket.c @@ -995,11 +995,6 @@ static int32_t _sockaddr_in6_scope_id(struct sockaddr_in6* addr) res = addr_in->sin6_scope_id; break; } - - if ((addr_in->sin6_scope_id > addr->sin6_scope_id) && (res >= 0)) { - // use last valid scope id as we're past the requested scope id - break; - } res = addr_in->sin6_scope_id; continue; } @@ -1009,11 +1004,6 @@ static int32_t _sockaddr_in6_scope_id(struct sockaddr_in6* addr) continue; } - if ((addr_in->sin6_scope_id > addr->sin6_scope_id) && (res >= 0)) { - // use last valid scope id as we're past the requested scope id - break; - } - res = addr_in->sin6_scope_id; /* if scope id equals the requested one then assume it was valid */ -- cgit v1.1-32-gdbae