diff --git a/gestion/gen_confs/firewall4.py b/gestion/gen_confs/firewall4.py index 4cec028a..66f4e3e1 100755 --- a/gestion/gen_confs/firewall4.py +++ b/gestion/gen_confs/firewall4.py @@ -340,7 +340,7 @@ class firewall_base(object) : bl_hard_ips = set( str(ip) for ips in [ - machine['ipHostNumber'] for machine in self.blacklisted_machines() if reduce(lambda x,y: x or y, ( ip.value in netaddr.IPNetwork(n) for n in config.NETs['all'] for ip in machine['ipHostNumber'])) + machine['ipHostNumber'] for machine in self.blacklisted_machines() if machine['ipHostNumber'] and reduce(lambda x,y: x or y, ( ip.value in netaddr.IPNetwork(n) for n in config.NETs['all'] for ip in machine['ipHostNumber'])) if set([bl.value['type'] for bl in machine.blacklist_actif() ]).intersection(blacklist_sanctions) ] for ip in ips @@ -755,7 +755,7 @@ class firewall_komaz(firewall_base_routeur): bl_soft_ips = set( str(ip) for ips in [ - machine['ipHostNumber'] for machine in self.blacklisted_machines() if reduce(lambda x,y: x or y, ( ip.value in netaddr.IPNetwork(n) for n in config.NETs['all'] for ip in machine['ipHostNumber'])) + machine['ipHostNumber'] for machine in self.blacklisted_machines() if machine['ipHostNumber'] and reduce(lambda x,y: x or y, ( ip.value in netaddr.IPNetwork(n) for n in config.NETs['all'] for ip in machine['ipHostNumber'])) if set([bl.value['type'] for bl in machine.blacklist_actif() ]).intersection(blacklist_sanctions_soft) ] for ip in ips