chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c88fd45
)
Note about packet loops
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 21 Aug 2021 23:20:55 +0000
(
00:20
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 21 Aug 2021 23:20:55 +0000
(
00:20
+0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
server/server.rs
patch
|
blob
|
history
diff --git
a/server/server.rs
b/server/server.rs
index 309368456f1a76f07bd0c7142d8000a39039a8f0..a493428fc9513e4d08b4e86f0765ce25e2cd6aea 100644
(file)
--- a/
server/server.rs
+++ b/
server/server.rs
@@
-39,6
+39,11
@@
pub struct RoutedPacket {
pub type RoutedPacketData = Box<[u8]>;
// loop prevention
+// we don't decrement the ttl (naughty) but loops cannot arise
+// because only the server has any routing code, and server
+// has no internal loops, so worst case is
+// client if -> client -> server -> client' -> client if'
+// and the ifs will decrement the ttl.
mod may_route {
#[derive(Clone,Debug)]
pub struct MayRoute(());