find SSU2 address with static key if supports both ipv4 and ipv6

This commit is contained in:
orignal 2022-07-27 10:19:25 -04:00
parent a344c09d0d
commit ae73e8a305

View File

@ -979,7 +979,8 @@ namespace data
return GetAddress (
[key, isV6](std::shared_ptr<const RouterInfo::Address> address)->bool
{
return address->IsSSU2 () && !memcmp (address->s, key, 32) && address->IsV6 () == isV6;
return address->IsSSU2 () && !memcmp (address->s, key, 32) &&
((isV6 && address->IsV6 ()) || (!isV6 && address->IsV4 ()));
});
}