diff --git a/gestion/gen_confs/filtrage.py b/gestion/gen_confs/filtrage.py index e2c72dd4..f10a0d9a 100644 --- a/gestion/gen_confs/filtrage.py +++ b/gestion/gen_confs/filtrage.py @@ -45,9 +45,13 @@ class exemptions(gen_config): for machine in machines: for destination in machine["exempt"]: if destination.value.version == 4: + if not machine['ipHostNumber']: + continue source = str(machine["ipHostNumber"][0]) requete = "INSERT INTO exemptes (ip_crans, ip_dest) VALUES ('%s','%s')" % (source, destination) else: + if not machine['macAddress']: + continue source = str(machine["macAddress"][0]) requete = "INSERT INTO exemptes6 (mac_crans, ip_dest) VALUES ('%s','%s')" % (source, destination) # Si ip vide, passons au suivant