mirror of
https://github.com/threefoldtech/mycelium.git
synced 2026-10-22 21:51:19 +00:00
Don't send seqno requests to peers if they are already in the cache
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
2 files changed
+14
-1
No files matched your search
+3
-1
@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
with a TTL exceeded otherwise. This fixes an issue where packets with a TTL of
|
||||
1 and 0 originating locally would not result in a proper ICMP reply. This happens
|
||||
for instance when using `traceroute`.
|
||||
- Check the local seqno request cache before sending a seqno request to a peer,
|
||||
to avoid spamming in certain occasions.
|
||||
|
||||
## [0.6.0] - 2025-04-25
|
||||
|
||||
@@ -551,7 +553,7 @@ This is a breaking change, check the main README file for update info.
|
||||
|
||||
- Remove trailing 'e' character from release archive names
|
||||
|
||||
## \[0.1.0\] - 2023-11-15
|
||||
## [0.1.0] - 2023-11-15
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
@@ -1493,7 +1493,18 @@ where
|
||||
}
|
||||
};
|
||||
|
||||
// Don't overload peers with request for the same source key
|
||||
let already_received = self.seqno_cache.get(&srck).unwrap_or_default();
|
||||
|
||||
for peer in targets {
|
||||
if already_received.contains(&peer) {
|
||||
trace!(
|
||||
peer = peer.connection_identifier(),
|
||||
"Don't send seqno request to peer which already received it recently"
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
debug!(
|
||||
"Sending seqno_request to {} for seqno {} of {}",
|
||||
peer.connection_identifier(),
|
||||
|
||||
Reference in new issue
Block a user