From 7ba600343d72144da83a3f6e01fb857820e5ae77 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Wed, 5 Mar 2014 00:06:15 +0100 Subject: [PATCH] firewall6: ignore mac auto dans blacklist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On avait oublié ce passage (sic). --- gestion/ipt.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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):