fix: store ipv6 peers in pex6
This commit is contained in:
parent
7a36819511
commit
e1640abbdc
|
@ -248,7 +248,7 @@ struct tau_announce_request
|
|||
response.pex = tr_pex::from_compact_ipv4(std::data(buf), std::size(buf), nullptr, 0);
|
||||
break;
|
||||
case TR_AF_INET6:
|
||||
response.pex = tr_pex::from_compact_ipv6(std::data(buf), std::size(buf), nullptr, 0);
|
||||
response.pex6 = tr_pex::from_compact_ipv6(std::data(buf), std::size(buf), nullptr, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -753,8 +753,8 @@ TEST_F(AnnouncerUdpTest, canAnnounceIPv6)
|
|||
expected_response.seeders = Seeders;
|
||||
expected_response.leechers = Leechers;
|
||||
expected_response.downloads = std::nullopt; // not specified in UDP announce
|
||||
expected_response.pex = std::vector<tr_pex>{ tr_pex{ addresses[0] }, tr_pex{ addresses[1] }, tr_pex{ addresses[2] } };
|
||||
expected_response.pex6 = {};
|
||||
expected_response.pex = {};
|
||||
expected_response.pex6 = std::vector<tr_pex>{ tr_pex{ addresses[0] }, tr_pex{ addresses[1] }, tr_pex{ addresses[2] } };
|
||||
expected_response.errmsg = {};
|
||||
expected_response.warning = {};
|
||||
expected_response.tracker_id = {}; // not specified in UDP announce
|
||||
|
|
Loading…
Reference in New Issue