chiark / gitweb /
Note about packet loops
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 Aug 2021 23:20:55 +0000 (00:20 +0100)
committerIan 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

index 309368456f1a76f07bd0c7142d8000a39039a8f0..a493428fc9513e4d08b4e86f0765ce25e2cd6aea 100644 (file)
@@ -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(());