mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
Make defining a port number for hosts in a cluster that only connect outbound optional
This commit is contained in:
parent
d2f260c168
commit
cf8671d078
2 changed files with 10 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
##! A framework for establishing and controlling a cluster of Zeek instances.
|
#hh#! A framework for establishing and controlling a cluster of Zeek instances.
|
||||||
##! In order to use the cluster framework, a script named
|
##! In order to use the cluster framework, a script named
|
||||||
##! ``cluster-layout.zeek`` must exist somewhere in Zeek's script search path
|
##! ``cluster-layout.zeek`` must exist somewhere in Zeek's script search path
|
||||||
##! which has a cluster definition of the :zeek:id:`Cluster::nodes` variable.
|
##! which has a cluster definition of the :zeek:id:`Cluster::nodes` variable.
|
||||||
|
@ -162,7 +162,7 @@ export {
|
||||||
## can specify a particular :rfc:`4007` ``zone_id``.
|
## can specify a particular :rfc:`4007` ``zone_id``.
|
||||||
zone_id: string &default="";
|
zone_id: string &default="";
|
||||||
## The port that this node will listen on for peer connections.
|
## The port that this node will listen on for peer connections.
|
||||||
p: port;
|
p: port &optional;
|
||||||
## Identifier for the interface a worker is sniffing.
|
## Identifier for the interface a worker is sniffing.
|
||||||
interface: string &optional;
|
interface: string &optional;
|
||||||
## Name of the manager node this node uses. For workers and proxies.
|
## Name of the manager node this node uses. For workers and proxies.
|
||||||
|
|
|
@ -89,11 +89,15 @@ event zeek_init() &priority=-10
|
||||||
Broker::subscribe(nodeid_topic(Broker::node_id()));
|
Broker::subscribe(nodeid_topic(Broker::node_id()));
|
||||||
Broker::subscribe(node_topic(node));
|
Broker::subscribe(node_topic(node));
|
||||||
|
|
||||||
|
if ( self?$p )
|
||||||
|
{
|
||||||
Broker::listen(Broker::default_listen_address,
|
Broker::listen(Broker::default_listen_address,
|
||||||
self$p,
|
self$p,
|
||||||
Broker::default_listen_retry);
|
Broker::default_listen_retry);
|
||||||
|
|
||||||
Cluster::log(fmt("listening on %s:%s", Broker::default_listen_address, self$p));
|
Cluster::log(fmt("listening on %s:%s", Broker::default_listen_address, self$p));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
switch ( self$node_type ) {
|
switch ( self$node_type ) {
|
||||||
case MANAGER:
|
case MANAGER:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue