Support ipv6 for peer and RPC comms:

Fixes: RIPD-1574

Alias beast address classes to the asio equivalents. Adjust users of
address classes accordingly. Fix resolver class so that it can support
ipv6 addresses. Make unit tests use ipv6 localhost network. Extend
endpoint peer message to support string endpoint
representations while also supporting the existing fields (both are
optional/repeated types). Expand test for Livecache and Endpoint.
Workaround some false positive ipaddr tests on windows (asio bug?)
Replaced usage of address::from_string(deprecated) with free function
make_address. Identified a remaining use of v4 address type and
replaced with the more appropriate IPEndpoint type (rpc_ip cmdline
option). Add CLI flag for using ipv4 with unit tests.

Release Notes
-------------

The optional rpc_port command line flag is deprecated. The rpc_ip
parameter now works as documented and accepts ip and port combined.
This commit is contained in:
Mike Ellery
2017-11-08 10:10:24 -08:00
parent fd4636b056
commit 08382d866b
41 changed files with 968 additions and 1253 deletions

View File

@@ -95,7 +95,7 @@ populate (Section const& section, std::string const& field, std::ostream& log,
{
if (! allowAllIps)
{
log << "0.0.0.0 not allowed'" <<
log << addr.first.address() << " not allowed'" <<
"' for key '" << field << "' in [" <<
section.name () << "]";
Throw<std::exception> ();
@@ -108,8 +108,8 @@ populate (Section const& section, std::string const& field, std::ostream& log,
if (has_any && ! ips->empty ())
{
log << "IP specified along with 0.0.0.0 '" << ip <<
"' for key '" << field << "' in [" <<
log << "IP specified along with " << addr.first.address() <<
" '" << ip << "' for key '" << field << "' in [" <<
section.name () << "]";
Throw<std::exception> ();
}