diff --git a/gestion/ipt.py b/gestion/ipt.py index 37c0a1c9..e9a79d47 100644 --- a/gestion/ipt.py +++ b/gestion/ipt.py @@ -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 == '': + # 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):