From 4b28b3ae60d8b11bdf52f28a54c931a2f10de7a3 Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Mon, 7 Oct 2024 09:53:11 +0200 Subject: [PATCH] Fix undesired propagation of interests to routers from peers --- zenoh/src/net/routing/hat/p2p_peer/interests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zenoh/src/net/routing/hat/p2p_peer/interests.rs b/zenoh/src/net/routing/hat/p2p_peer/interests.rs index aaf24dd5b6..6cadc4acbe 100644 --- a/zenoh/src/net/routing/hat/p2p_peer/interests.rs +++ b/zenoh/src/net/routing/hat/p2p_peer/interests.rs @@ -147,7 +147,8 @@ impl HatInterestTrait for HatCode { }; for dst_face in tables.faces.values_mut().filter(|f| { f.whatami == WhatAmI::Router - || (options.tokens() + || (face.whatami == WhatAmI::Client + && options.tokens() && mode == InterestMode::Current && f.whatami == WhatAmI::Peer && !initial_interest(f).map(|i| i.finalized).unwrap_or(true))