fw6: adaptation au cas sans rid
This commit is contained in:
parent
7b0adb2ea9
commit
4bffa3ece1
2 changed files with 8 additions and 0 deletions
|
@ -175,6 +175,8 @@ ACCEPT' % (dev, proto, ip, port))
|
|||
def blacklist(self, machine):
|
||||
''' Met des règles empêchant toute communication
|
||||
vers et à partir de la machine considérée '''
|
||||
if not machine.rid():
|
||||
return
|
||||
ident = int(machine.rid())
|
||||
ip = ""
|
||||
for type_m, plages in rid_primaires.iteritems():
|
||||
|
@ -216,6 +218,8 @@ class Update(object):
|
|||
dev_ext = iface6('sixxs2')
|
||||
net = ""
|
||||
for r in rids:
|
||||
if not r:
|
||||
continue
|
||||
net, _ = find_rid_plage(r)
|
||||
if net == "Inconnu":
|
||||
raise RidError("Il n'y a pas de réseau associé au rid %i" % m)
|
||||
|
@ -826,6 +830,8 @@ def macips(ipt, machines, types_machines):
|
|||
tab = {'serveurs' : 'fil' }
|
||||
|
||||
for machine in machines:
|
||||
if not machine.rid():
|
||||
continue
|
||||
for type_m in types_machines:
|
||||
for plage in rid[type_m]:
|
||||
if int(machine.rid()) in range(plage[0], plage[1]):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue