From a29e729c1e3a61b851d314a4decee69abd470724 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Fri, 8 Nov 2013 02:58:29 +0100 Subject: [PATCH] [firewall4] Oublis lors d'une liste d'ipv4 vide --- gestion/gen_confs/firewall4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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