Skip to content

Commit

Permalink
Ignore received declares for unknown interests
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Sep 19, 2024
1 parent a26c868 commit 1e98173
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zenoh/src/net/routing/hat/client/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ fn declare_simple_token(
);
return;
}
} else if !face.local_interests.contains_key(&interest_id) {
tracing::debug!(
"Received DeclareToken for {} from {} with unknown interest_id {}. Ignore.",
res.expr(),
face,
interest_id,
);
return;
}
}
register_simple_token(tables, face, id, res);
Expand Down
8 changes: 8 additions & 0 deletions zenoh/src/net/routing/hat/p2p_peer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ fn declare_simple_token(
);
return;
}
} else if !face.local_interests.contains_key(&interest_id) {
println!(
"Received DeclareToken for {} from {} with unknown interest_id {}. Ignore.",
res.expr(),
face,
interest_id,
);
return;
}
}
register_simple_token(tables, face, id, res);
Expand Down

0 comments on commit 1e98173

Please sign in to comment.