Merge remote-tracking branch 'origin/topic/johanna/gh-3242'

* origin/topic/johanna/gh-3242:
  Community-id: load main script in notice script, fix notice script

(cherry picked from commit 70c76977cf)
This commit is contained in:
Johanna Amann 2023-08-23 12:31:16 +01:00 committed by Tim Wojtulewicz
parent d4036f423d
commit ab2b241c3f
4 changed files with 11 additions and 9 deletions

5
NEWS
View file

@ -40,6 +40,11 @@ This release fixes the following bugs:
- Fixed undefined symbols being reported from Spicy when building some of the - Fixed undefined symbols being reported from Spicy when building some of the
binary packages for Zeek. binary packages for Zeek.
- Loading ``policy/frameworks/notice/community-id.zeek`` now also automatically
community ID logging. In the past, loading the script had no effect unless
``policy/protocols/conn/community-id-logging.zeek`` was loaded before. This
was fairly unusual and hard to debug behavior.
Zeek 6.0.0 Zeek 6.0.0
========== ==========

View file

@ -1,11 +1,9 @@
# Source this script in addition to protocols/conn/community-id # Source this script to add Community ID to notices.
# to add Community ID to notices. # This script will automatically load the main community-id script.
# Only support loading this if the main script is also loaded.
@load base/protocols/conn @load base/protocols/conn
@load base/frameworks/notice @load base/frameworks/notice
@load policy/protocols/conn/community-id-logging
@ifdef ( CommunityID::seed )
module CommunityID::Notice; module CommunityID::Notice;
@ -23,6 +21,5 @@ export {
hook Notice::notice(n: Notice::Info) hook Notice::notice(n: Notice::Info)
{ {
if ( CommunityID::Notice::enabled && n?$conn ) if ( CommunityID::Notice::enabled && n?$conn )
n$community_id = community_id_v1(n$conn$id); n$community_id = community_id_v1(n$conn$id, CommunityID::seed, CommunityID::do_base64);
} }
@endif

View file

@ -1 +1 @@
828845c99306c6d5d6811fa42987de5b16f530b9 f0dfda82f616d478df1a290116b4b7efdd82f00a

View file

@ -1 +1 @@
b121bfe4d869f1f5e334505b970cd456558ef6a1 eea2f9972f5b103048a40d07b3f14c41d92336bc