mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
filter out unspecified addresses. Check floodfill status change
This commit is contained in:
parent
0f9e3c5b33
commit
846eac29dc
4 changed files with 44 additions and 44 deletions
|
@ -210,11 +210,19 @@ namespace data
|
|||
address->host = boost::asio::ip::address::from_string (value, ecode);
|
||||
if (!ecode)
|
||||
{
|
||||
// add supported protocol
|
||||
if (address->host.is_v4 ())
|
||||
supportedTransports |= (address->transportStyle == eTransportNTCP) ? eNTCPV4 : eSSUV4;
|
||||
else
|
||||
supportedTransports |= (address->transportStyle == eTransportNTCP) ? eNTCPV6 : eSSUV6;
|
||||
#if BOOST_VERSION >= 104900
|
||||
if (!address->host.is_unspecified ()) // check if address is valid
|
||||
#else
|
||||
address->host.to_string (ecode);
|
||||
if (!ecode)
|
||||
#endif
|
||||
{
|
||||
// add supported protocol
|
||||
if (address->host.is_v4 ())
|
||||
supportedTransports |= (address->transportStyle == eTransportNTCP) ? eNTCPV4 : eSSUV4;
|
||||
else
|
||||
supportedTransports |= (address->transportStyle == eTransportNTCP) ? eNTCPV6 : eSSUV6;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!strcmp (key, "port"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue