From 233127393fea4c817783d6d7ea7797ca77efe176 Mon Sep 17 00:00:00 2001 From: Miguel Portilla Date: Wed, 11 Mar 2015 19:02:54 -0400 Subject: [PATCH] Better admin IP management in .cfg (RIPD-820): * Deprecate rpc_admin_allow section from configuration file * New port-specific setting 'admin': * Comma-separated list of IP addresses that are allowed administrative privileges (subject to username & password authentication if configured) * 127.0.0.1 is no longer a default admin IP. * 0.0.0.0 may be specified to indicate "any IP" but cannot be combined with other IP addresses. --- beast/net/IPAddress.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/beast/net/IPAddress.h b/beast/net/IPAddress.h index e59020a96..f5bb8bbe9 100644 --- a/beast/net/IPAddress.h +++ b/beast/net/IPAddress.h @@ -139,6 +139,14 @@ public: return m_v6; } + /** Returns `true` if this address represents 0.0.0.0 */ + bool + is_any () const + { + return is_v4 () ? m_v4 == IP::AddressV4::any () + : false; // m_v6 == IP::AddressV6::any(); + } + template friend void