mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
policy/community-id: Populate conn$community_id in new_connection()
This wasn't possible before #3028 was fixed, but now it's safe to set the value in new_connection() and allow other users access to the field much earlier. We do not have to deal with connection_flipped() because the community-id hash is symmetric.
This commit is contained in:
parent
0a7c9365be
commit
cb679e4d7a
7 changed files with 39 additions and 3 deletions
|
@ -17,7 +17,10 @@ export {
|
|||
};
|
||||
}
|
||||
|
||||
event connection_state_remove(c: connection)
|
||||
module Conn;
|
||||
|
||||
event new_connection(c: connection) &priority=5
|
||||
{
|
||||
Conn::set_conn(c, F); # likely first to access :-/
|
||||
c$conn$community_id = community_id_v1(c$id, CommunityID::seed, CommunityID::do_base64);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue