From cd330c801d461d35be9fb3acde6582bac9f733be Mon Sep 17 00:00:00 2001 From: Seth Hall Date: Tue, 13 Oct 2020 16:48:15 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Jon Siwek --- scripts/base/frameworks/cluster/main.zeek | 3 ++- scripts/base/frameworks/cluster/setup-connections.zeek | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/base/frameworks/cluster/main.zeek b/scripts/base/frameworks/cluster/main.zeek index 85e1f3a4f9..110f4ad3af 100644 --- a/scripts/base/frameworks/cluster/main.zeek +++ b/scripts/base/frameworks/cluster/main.zeek @@ -162,7 +162,8 @@ export { ## can specify a particular :rfc:`4007` ``zone_id``. zone_id: string &default=""; ## The port that this node will listen on for peer connections. - p: port &optional; + ## A value of ``0/unknown`` means the node is not pre-configured to listen. + p: port &default=0/unknown; ## Identifier for the interface a worker is sniffing. interface: string &optional; ## Name of the manager node this node uses. For workers and proxies. diff --git a/scripts/base/frameworks/cluster/setup-connections.zeek b/scripts/base/frameworks/cluster/setup-connections.zeek index 7e470037a6..55ab8a460a 100644 --- a/scripts/base/frameworks/cluster/setup-connections.zeek +++ b/scripts/base/frameworks/cluster/setup-connections.zeek @@ -89,7 +89,7 @@ event zeek_init() &priority=-10 Broker::subscribe(nodeid_topic(Broker::node_id())); Broker::subscribe(node_topic(node)); - if ( self?$p ) + if ( self$p != 0/unknown ) { Broker::listen(Broker::default_listen_address, self$p,