From bf74443acd199f601360f30604303052291c7672 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 22 Aug 2021 00:20:55 +0100 Subject: [PATCH] Note about packet loops Signed-off-by: Ian Jackson --- server/server.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/server.rs b/server/server.rs index 3093684..a493428 100644 --- 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(()); -- 2.30.2