From 574d7f82b78f7b5703eaaff227a5075aa2afb1a5 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sat, 6 Jun 2020 19:18:00 +0200 Subject: socket: Use common IPv6 scope values and correct loopback scope to link-local --- common/socket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common') 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; } -- cgit v1.1-32-gdbae