Comparison

util/ip.lua @ 11650:a227bc35771e

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 03 Jul 2021 17:28:07 +0200
parent 10593:079b31c8dbf2
parent 11649:aa119de5f6c7
child 12355:a0ff5c438e9d
comparison
equal deleted inserted replaced
11648:96d3cbeb9275 11650:a227bc35771e
104 local ipv6mapped = new_ip("::ffff:0:0"); 104 local ipv6mapped = new_ip("::ffff:0:0");
105 105
106 local function v4scope(ip) 106 local function v4scope(ip)
107 if match(ip, loopback4, 8) then 107 if match(ip, loopback4, 8) then
108 return 0x2; 108 return 0x2;
109 elseif match(ip, linklocal4) then 109 elseif match(ip, linklocal4, 16) then
110 return 0x2; 110 return 0x2;
111 else -- Global unicast 111 else -- Global unicast
112 return 0xE; 112 return 0xE;
113 end 113 end
114 end 114 end