torrust-tracker
torrust-tracker copied to clipboard
Udp: Basic Connection Cookie Implementation
Depends on: #84
Rebased after merge of #81
Rebased.
Rebased after merge of #83
Rebased after merge of #84
@josecelano Three of your tests now fail, since they use different remote_addresses for the connection cookie.
test
udp::handlers::tests::announce_request::using_ipv4::an_announced_peer_should_be_added_to_the_tracker ...
remote_address: 127.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [45, 59, 50, 101, 97, 203, 48, 19]
remote_address: 126.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [148, 172, 221, 37, 102, 20, 245, 168]
FAILED
test
udp::handlers::tests::announce_request::using_ipv4::the_announced_peer_should_not_be_included_in_the_response ...
remote_address: 127.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [45, 59, 50, 101, 97, 203, 48, 19]
remote_address: 126.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [148, 172, 221, 37, 102, 20, 245, 168]
FAILED
test
udp::handlers::tests::announce_request::using_ipv4::the_tracker_should_always_use_the_remote_client_ip_but_not_the_port_in_the_udp_request_header_instead_of_the_peer_address_in_the_announce_request ...
remote_address: 127.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [45, 59, 50, 101, 97, 203, 48, 19]
remote_address: 126.0.0.1:8081, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [93, 255, 163, 17, 63, 95, 9, 128]
FAILED
@josecelano Three of your tests now fail, since they use different remote_addresses for the connection cookie.
test udp::handlers::tests::announce_request::using_ipv4::an_announced_peer_should_be_added_to_the_tracker ... remote_address: 127.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [45, 59, 50, 101, 97, 203, 48, 19] remote_address: 126.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [148, 172, 221, 37, 102, 20, 245, 168] FAILEDtest udp::handlers::tests::announce_request::using_ipv4::the_announced_peer_should_not_be_included_in_the_response ... remote_address: 127.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [45, 59, 50, 101, 97, 203, 48, 19] remote_address: 126.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [148, 172, 221, 37, 102, 20, 245, 168] FAILEDtest udp::handlers::tests::announce_request::using_ipv4::the_tracker_should_always_use_the_remote_client_ip_but_not_the_port_in_the_udp_request_header_instead_of_the_peer_address_in_the_announce_request ... remote_address: 127.0.0.1:8080, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [45, 59, 50, 101, 97, 203, 48, 19] remote_address: 126.0.0.1:8081, time_extent: TimeExtent { increment: 2s, amount: 60 }, cookie: [93, 255, 163, 17, 63, 95, 9, 128] FAILED
I've fixed them in this PR.
ACK 2911f3d05587bc0501979e76347c73279456b0fe