@@ -33,20 +33,25 @@ type regServer interface {
33
33
34
34
// config defines the variables and options from the toml config file
35
35
type config struct {
36
- DNSListenAddr string `toml:"dns_listen_addr"`
37
- Domain string `toml:"domain"`
38
- DNSPrivkeyPath string `toml:"dns_private_key_path"`
39
- APIPort uint16 `toml:"api_port"`
40
- ZMQAuthVerbose bool `toml:"zmq_auth_verbose"`
41
- ZMQAuthType string `toml:"zmq_auth_type"`
42
- ZMQPort uint16 `toml:"zmq_port"`
43
- ZMQBindAddr string `toml:"zmq_bind_addr"`
44
- ZMQPrivateKeyPath string `toml:"zmq_privkey_path"`
45
- StationPublicKeys []string `toml:"station_pubkeys"`
46
- ClientConfPath string `toml:"clientconf_path"`
47
- latestClientConf * pb.ClientConf
48
- LogLevel string `toml:"log_level"`
49
- LogMetricsInterval uint16 `toml:"log_metrics_interval"`
36
+ DNSListenAddr string `toml:"dns_listen_addr"`
37
+ Domain string `toml:"domain"`
38
+ DNSPrivkeyPath string `toml:"dns_private_key_path"`
39
+ APIPort uint16 `toml:"api_port"`
40
+ ZMQAuthVerbose bool `toml:"zmq_auth_verbose"`
41
+ ZMQAuthType string `toml:"zmq_auth_type"`
42
+ ZMQPort uint16 `toml:"zmq_port"`
43
+ ZMQBindAddr string `toml:"zmq_bind_addr"`
44
+ ZMQPrivateKeyPath string `toml:"zmq_privkey_path"`
45
+ StationPublicKeys []string `toml:"station_pubkeys"`
46
+ ClientConfPath string `toml:"clientconf_path"`
47
+ latestClientConf * pb.ClientConf
48
+ LogLevel string `toml:"log_level"`
49
+ LogMetricsInterval uint16 `toml:"log_metrics_interval"`
50
+ EnforceSubnetOverrides bool `toml:"enforce_subnet_overrides"`
51
+ PrcntMinRegsToOverride float64 `toml:"prcnt_min_regs_to_override"`
52
+ PrcntPrefixRegsToOverride float64 `toml:"prcnt_prefix_regs_to_override"`
53
+ OverrideSubnets []regprocessor.Subnet `toml:"override_subnet"`
54
+ ExclusionsFromOverride []regprocessor.Subnet `toml:"excluded_subnet_from_overrides"`
50
55
}
51
56
52
57
var defaultTransports = map [pb.TransportType ]lib.Transport {
@@ -192,9 +197,9 @@ func main() {
192
197
193
198
switch conf .ZMQAuthType {
194
199
case "CURVE" :
195
- processor , err = regprocessor .NewRegProcessor (conf .ZMQBindAddr , conf .ZMQPort , zmqPrivkey , conf .ZMQAuthVerbose , conf .StationPublicKeys , metrics )
200
+ processor , err = regprocessor .NewRegProcessor (conf .ZMQBindAddr , conf .ZMQPort , zmqPrivkey , conf .ZMQAuthVerbose , conf .StationPublicKeys , metrics , conf . EnforceSubnetOverrides , conf . OverrideSubnets , conf . ExclusionsFromOverride , conf . PrcntMinRegsToOverride , conf . PrcntPrefixRegsToOverride )
196
201
case "NULL" :
197
- processor , err = regprocessor .NewRegProcessorNoAuth (conf .ZMQBindAddr , conf .ZMQPort , metrics )
202
+ processor , err = regprocessor .NewRegProcessorNoAuth (conf .ZMQBindAddr , conf .ZMQPort , metrics , conf . EnforceSubnetOverrides , conf . OverrideSubnets , conf . ExclusionsFromOverride , conf . PrcntMinRegsToOverride , conf . PrcntPrefixRegsToOverride )
198
203
default :
199
204
log .Fatalf ("Unknown ZMQ auth type: %s" , conf .ZMQAuthType )
200
205
}
0 commit comments