#2402 raise error if action map is not specified. update comment in firewall.py
This commit is contained in:
@@ -997,7 +997,7 @@ class ActionManager:
|
||||
{0: ("NODE_SERVICE_SCAN", {node_id:0, service_id:2})}
|
||||
"""
|
||||
if act_map is None:
|
||||
self.action_map = self._enumerate_actions()
|
||||
raise RuntimeError("Action map must be specified in the config file.")
|
||||
else:
|
||||
self.action_map = {i: (a["action"], a["options"]) for i, a in act_map.items()}
|
||||
# make sure all numbers between 0 and N are represented as dict keys in action map
|
||||
|
||||
@@ -113,7 +113,7 @@ class Firewall(Router):
|
||||
self.connect_nic(
|
||||
RouterInterface(ip_address="127.0.0.1", subnet_mask="255.0.0.0", gateway="0.0.0.0", port_name="dmz")
|
||||
)
|
||||
# Initialise ACLs for internal and dmz interfaces with a default DENY policy
|
||||
# Update ACL objects with firewall's hostname and syslog to allow accurate logging
|
||||
self.internal_inbound_acl.sys_log = kwargs["sys_log"]
|
||||
self.internal_inbound_acl.name = f"{hostname} - Internal Inbound"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user