Allow all addresses on the loopback subnet (127.0.0.0/8) not just 127.0.0.1
Signed-off-by: Giel van Schijndel <me@mortis.eu>
This commit is contained in:
parent
a0780ba08a
commit
7cc2ceae09
|
@ -2558,7 +2558,10 @@ bool ClientAllowed(const boost::asio::ip::address& address)
|
||||||
return ClientAllowed(address.to_v6().to_v4());
|
return ClientAllowed(address.to_v6().to_v4());
|
||||||
|
|
||||||
if (address == asio::ip::address_v4::loopback()
|
if (address == asio::ip::address_v4::loopback()
|
||||||
|| address == asio::ip::address_v6::loopback())
|
|| address == asio::ip::address_v6::loopback()
|
||||||
|
|| (address.is_v4()
|
||||||
|
// Chech whether IPv4 addresses match 127.0.0.0/8 (loopback subnet)
|
||||||
|
&& (address.to_v4().to_ulong() & 0xff000000) == 0x7f000000))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
const string strAddress = address.to_string();
|
const string strAddress = address.to_string();
|
||||||
|
|
Loading…
Reference in New Issue