# HG changeset patch # User Matthew Wild # Date 1448207530 0 # Node ID 02717098cbba8fd273f56fc82b911d73829b9b93 # Parent 3c4799467daef7a9a89831d1a79fc9f2c7e2827d# Parent 566e1cfcb814561fc9161470f61fb2c3a693a92a Merge 0.10->trunk diff -r 3c4799467dae -r 02717098cbba plugins/mod_admin_telnet.lua --- a/plugins/mod_admin_telnet.lua Tue Nov 17 17:12:45 2015 +0000 +++ b/plugins/mod_admin_telnet.lua Sun Nov 22 15:52:10 2015 +0000 @@ -512,6 +512,9 @@ if session.ip and session.ip:match(":") then line[#line+1] = "(IPv6)"; end + if session.remote then + line[#line+1] = "(remote)"; + end return table.concat(line, " "); end diff -r 3c4799467dae -r 02717098cbba util/ip.lua --- a/util/ip.lua Tue Nov 17 17:12:45 2015 +0000 +++ b/util/ip.lua Sun Nov 22 15:52:10 2015 +0000 @@ -229,13 +229,10 @@ local function match(ipA, ipB, bits) local common_bits = commonPrefixLength(ipA, ipB); - if not bits then - return ipA == ipB; - end if bits and ipB.proto == "IPv4" then common_bits = common_bits - 96; -- v6 mapped addresses always share these bits end - return common_bits >= bits; + return common_bits >= (bits or 128); end return {new_ip = new_ip,