diff options
author | 2024-10-09 01:24:56 +0200 | |
---|---|---|
committer | 2024-10-09 01:32:50 +0200 | |
commit | dd242cb9106c22ccc9309e9c15b3e6b79b2a5ccf (patch) | |
tree | 3714667b4cb6408c65344c07f3144e45ce878901 | |
parent | 362f7848ac89b74d9dd113b38b51ecb601f76094 (diff) | |
download | libimobiledevice-glue-dd242cb9106c22ccc9309e9c15b3e6b79b2a5ccf.tar.gz libimobiledevice-glue-dd242cb9106c22ccc9309e9c15b3e6b79b2a5ccf.tar.bz2 |
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().
-rw-r--r-- | src/socket.c | 10 |
1 files changed, 0 insertions, 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 */ |