diff --git a/wifi/hotspot.py b/wifi/hotspot.py index 55ab0573..26540e37 100755 --- a/wifi/hotspot.py +++ b/wifi/hotspot.py @@ -53,14 +53,14 @@ class Server: """Ajout d'une IP au firewall""" cmd = "pfctl -t clients_hotspot_autorises -Tadd %s" % ip if self.execute(cmd): - syslog(LOG_INFO | LOG_LOCAL3, "Nouveau client hotspots: %s" % ip) + syslog(LOG_INFO | LOG_LOCAL4, "Nouveau client hotspots: %s" % ip) def del_ip(self,ip): """Retire une règle du firewall""" cmd = "pfctl -t clients_hotspot_autorises -Tdelete %s" % ip if self.execute(cmd): - syslog(LOG_INFO | LOG_LOCAL3, "Suppression du client: %s" % ip) + syslog(LOG_INFO | LOG_LOCAL4, "Suppression du client: %s" % ip) def list_ips(self): """Liste les IP actuellement dans le firewall""" @@ -87,7 +87,7 @@ class Server: self.del_ip(ip) deleted=True if deleted: - syslog(LOG_INFO | LOG_LOCAL3, "Clients hotspots: %s" % (", ".join(self.list_ips())) or "aucun") + syslog(LOG_INFO | LOG_LOCAL3, "Clients hotspots: %s" % (", ".join(self.list_ips()) or "aucun")) def daemonize(self): """Passe en arrière plan""" @@ -122,9 +122,9 @@ class Server: result = select([s],[],[],60)[0] if result: # On a quelqu'un, on lit une ligne - syslog(LOG_INFO | LOG_LOCAL3, "Nouvelle requête") + syslog(LOG_INFO | LOG_LOCAL4, "Nouvelle requete") ip = self.socket.readline().strip() - syslog(LOG_INFO | LOG_LOCAL3, "Nouvelle requête pour l'IP : %s" % ip) + syslog(LOG_INFO | LOG_LOCAL4, "Nouvelle requete pour l'IP : %s" % ip) if re.match("^10\.231.*", ip): self.add_ip(ip) # Dans tous les cas, on vire les IP inutiles