summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2020-06-06 19:18:00 +0200
committerGravatar Martin Szulecki2020-06-06 19:18:00 +0200
commit574d7f82b78f7b5703eaaff227a5075aa2afb1a5 (patch)
tree3d5a911c74a9f47f8a90264595a7fae3fe4395fd /common
parent0d800465dafba89352f4acefd24515461b041a64 (diff)
downloadlibimobiledevice-574d7f82b78f7b5703eaaff227a5075aa2afb1a5.tar.gz
libimobiledevice-574d7f82b78f7b5703eaaff227a5075aa2afb1a5.tar.bz2
socket: Use common IPv6 scope values and correct loopback scope to link-local
Diffstat (limited to 'common')
-rw-r--r--common/socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/socket.c b/common/socket.c
index 6b4a596..26cf496 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -325,7 +325,7 @@ static uint32_t _in6_addr_scope(struct in6_addr* addr)
325 } else if (IN6_IS_ADDR_MC_LINKLOCAL(addr)) { 325 } else if (IN6_IS_ADDR_MC_LINKLOCAL(addr)) {
326 scope = 2; 326 scope = 2;
327 } else if (IN6_IS_ADDR_MC_SITELOCAL(addr)) { 327 } else if (IN6_IS_ADDR_MC_SITELOCAL(addr)) {
328 scope = 3; 328 scope = 5;
329 } 329 }
330 330
331 return scope; 331 return scope;
@@ -333,10 +333,10 @@ static uint32_t _in6_addr_scope(struct in6_addr* addr)
333 333
334 if (IN6_IS_ADDR_LINKLOCAL(addr)) { 334 if (IN6_IS_ADDR_LINKLOCAL(addr)) {
335 scope = 2; 335 scope = 2;
336 } else if (IN6_IS_ADDR_SITELOCAL(addr)) {
337 scope = 3;
338 } else if (IN6_IS_ADDR_LOOPBACK(addr)) { 336 } else if (IN6_IS_ADDR_LOOPBACK(addr)) {
339 scope = 4; 337 scope = 2;
338 } else if (IN6_IS_ADDR_SITELOCAL(addr)) {
339 scope = 5;
340 } else if (IN6_IS_ADDR_UNSPECIFIED(addr)) { 340 } else if (IN6_IS_ADDR_UNSPECIFIED(addr)) {
341 scope = 0; 341 scope = 0;
342 } 342 }