# HG changeset patch # User Kim Alvefur # Date 1625275677 -7200 # Node ID aa119de5f6c72a066f6ccb541f21352c38c9cd15 # Parent 35e880501efdedd4758061f1707f585b083352c2 util.ip: Fix netmask for link-local address range This may have mistakenly caused link-local addresses to be considered global. May have caused mod_s2s and prosodyctl check dns to behave incorrectly on networks using link-local IPv4 addresses. By my guesstimate, these are extremely rare. Probably minimal impact beyond a bit longer to establish s2s and some possible confusion from prosodyctl check dns results. Ref RFC 3927 diff -r 35e880501efd -r aa119de5f6c7 util/ip.lua --- a/util/ip.lua Thu May 27 12:35:55 2021 +0200 +++ b/util/ip.lua Sat Jul 03 03:27:57 2021 +0200 @@ -100,7 +100,7 @@ local function v4scope(ip) if match(ip, loopback4, 8) then return 0x2; - elseif match(ip, linklocal4) then + elseif match(ip, linklocal4, 16) then return 0x2; else -- Global unicast return 0xE;