diff options
author | Martin Szulecki | 2020-06-06 19:18:00 +0200 |
---|---|---|
committer | Martin Szulecki | 2020-06-06 19:18:00 +0200 |
commit | 574d7f82b78f7b5703eaaff227a5075aa2afb1a5 (patch) | |
tree | 3d5a911c74a9f47f8a90264595a7fae3fe4395fd /common | |
parent | 0d800465dafba89352f4acefd24515461b041a64 (diff) | |
download | libimobiledevice-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.c | 8 |
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) } else if (IN6_IS_ADDR_MC_LINKLOCAL(addr)) { scope = 2; } else if (IN6_IS_ADDR_MC_SITELOCAL(addr)) { - scope = 3; + scope = 5; } return scope; @@ -333,10 +333,10 @@ static uint32_t _in6_addr_scope(struct in6_addr* addr) if (IN6_IS_ADDR_LINKLOCAL(addr)) { scope = 2; - } else if (IN6_IS_ADDR_SITELOCAL(addr)) { - scope = 3; } else if (IN6_IS_ADDR_LOOPBACK(addr)) { - scope = 4; + scope = 2; + } else if (IN6_IS_ADDR_SITELOCAL(addr)) { + scope = 5; } else if (IN6_IS_ADDR_UNSPECIFIED(addr)) { scope = 0; } |