firewall6: ignore mac auto dans blacklist

On avait oublié ce passage (sic).
This commit is contained in:
Daniel STAN 2014-03-05 00:06:15 +01:00
parent 965da3babf
commit 7ba600343d

View file

@ -187,11 +187,14 @@ ACCEPT' % (dev, proto, ip, port))
mac=machine.mac()
break
self.filter.blacklist_src('-m mac --mac-source %s -j REJECT --reject-with icmp6-port-unreachable' % mac)
if ip:
self.filter.blacklist_dst('-d %s -j REJECT --reject-with icmp6-adm-prohibited' % ip)
elif mac == '<automatique>':
# else: si mac auto, c'est normal de pas avoir pu calculer l'ip
return
else:
print "Ipv6 de la machine %s impossible à calculer" % machine.nom()
print (u"Ipv6 de la machine %s impossible à calculer" % machine.nom()).encode('utf-8')
self.filter.blacklist_src('-m mac --mac-source %s -j REJECT --reject-with icmp6-port-unreachable' % mac)
def version(self):