mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 10:15:31 +00:00
udp: ignore requests with source port of value zero
This commit is contained in:
parent
e485a9ae45
commit
ae77c7426e
1 changed files with 6 additions and 0 deletions
|
|
@ -31,6 +31,12 @@ pub fn read_requests(
|
|||
loop {
|
||||
match socket.recv_from(&mut buffer[..]) {
|
||||
Ok((amt, src)) => {
|
||||
if src.port() == 0 {
|
||||
::log::info!("Ignored request from {} because source port is zero", src);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
let res_request =
|
||||
Request::from_bytes(&buffer[..amt], config.protocol.max_scrape_torrents);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue