From 7d530bfc12bad38b5a39f8b752d62b89ba754519 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 29 Jun 2026 15:58:08 +0100 Subject: [PATCH 1/4] attempt to fix the doc comment instead --- noq-proto/src/tests/util.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/noq-proto/src/tests/util.rs b/noq-proto/src/tests/util.rs index fb48a4edf..4189850dd 100644 --- a/noq-proto/src/tests/util.rs +++ b/noq-proto/src/tests/util.rs @@ -1673,13 +1673,14 @@ impl BasicRouting { /// Set of uni-directional links between interfaces of a client and server. /// /// Each entry on the client or server side represents a single interface in a /32 -/// subnet. Each interface has exactly one uni-directional outgoing link to a peer -/// interface. The destination interface is identified by the `usize` index into the peer's -/// interfaces `Vec`. +/// subnet. There is at most one peer address which can send to this interface, indicated by +/// the index into the peer's interfaces. If the peer interface does not exist datagrams +/// will be dropped. If the peer sent the packet using a different source address than the +/// allowed interface the datagram will be dropped. /// -/// An interface may only appear once for a peer, so each interface only has a single -/// outgoing link. However interfaces can have multiple incoming links if multiple -/// interfaces of the peer have an outgoing link to it. +/// This implies an interface can only have one incoming link. It does allow creating links +/// that are not functional in both directions however by using a dummy or mismatching +/// inteface for the allowed incoming source addresses. #[derive(Debug, Clone)] pub(super) struct ManyToManyRouting { client_routes: Vec<(SocketAddr, usize)>, From 54775e81e02f0ed6ef8191e0e4c076f457da9e7f Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 29 Jun 2026 16:00:13 +0100 Subject: [PATCH 2/4] typo --- noq-proto/src/tests/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noq-proto/src/tests/util.rs b/noq-proto/src/tests/util.rs index 4189850dd..9857fc733 100644 --- a/noq-proto/src/tests/util.rs +++ b/noq-proto/src/tests/util.rs @@ -1680,7 +1680,7 @@ impl BasicRouting { /// /// This implies an interface can only have one incoming link. It does allow creating links /// that are not functional in both directions however by using a dummy or mismatching -/// inteface for the allowed incoming source addresses. +/// interface for the allowed incoming source addresses. #[derive(Debug, Clone)] pub(super) struct ManyToManyRouting { client_routes: Vec<(SocketAddr, usize)>, From 08d4d0a2eb3651a55849d0f85aeb9c287c6674a8 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Wed, 1 Jul 2026 16:42:54 +0100 Subject: [PATCH 3/4] explain a bit more and remove falsehood --- noq-proto/src/tests/util.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/noq-proto/src/tests/util.rs b/noq-proto/src/tests/util.rs index 9857fc733..42dc6a061 100644 --- a/noq-proto/src/tests/util.rs +++ b/noq-proto/src/tests/util.rs @@ -1678,9 +1678,19 @@ impl BasicRouting { /// will be dropped. If the peer sent the packet using a different source address than the /// allowed interface the datagram will be dropped. /// -/// This implies an interface can only have one incoming link. It does allow creating links -/// that are not functional in both directions however by using a dummy or mismatching -/// interface for the allowed incoming source addresses. +/// This implies an interface can only have one incoming link. It does allow creating +/// interface pairs that do not have bi-directional connectivity. E.g.: +/// +/// ```rust +/// ManyToManyRouting { +/// client_routes: [("[::1:1]:1", 1), ("[::1:2]:1", 1)], +/// server_routes: [("[::2:1]:1", 1), ("[::2:2]:1", 1)], +/// } +/// ``` +/// +/// This would allow the client to open up a path from `::1:2` to `::2:2`, but because a +/// path is on the 4-tuple the server would respond from `::2:2` which is not allowed to +/// send to `::1:2` and the resonse path would drop all datagrams. #[derive(Debug, Clone)] pub(super) struct ManyToManyRouting { client_routes: Vec<(SocketAddr, usize)>, From 5ad1e45c3acdd63b5e9a9d3a640cf7acc5c1578f Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Wed, 1 Jul 2026 16:47:50 +0100 Subject: [PATCH 4/4] spelling --- noq-proto/src/tests/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noq-proto/src/tests/util.rs b/noq-proto/src/tests/util.rs index 42dc6a061..d1eaa1eac 100644 --- a/noq-proto/src/tests/util.rs +++ b/noq-proto/src/tests/util.rs @@ -1690,7 +1690,7 @@ impl BasicRouting { /// /// This would allow the client to open up a path from `::1:2` to `::2:2`, but because a /// path is on the 4-tuple the server would respond from `::2:2` which is not allowed to -/// send to `::1:2` and the resonse path would drop all datagrams. +/// send to `::1:2` and the response path would drop all datagrams. #[derive(Debug, Clone)] pub(super) struct ManyToManyRouting { client_routes: Vec<(SocketAddr, usize)>,