From f84db66b7e54f8e00bdcf1bae9dced41d5bdb0d5 Mon Sep 17 00:00:00 2001 From: Olivier Huber Date: Sat, 17 Oct 2009 15:09:53 +0200 Subject: [PATCH] [./radius_auth.py] Les machines en blackliste virus et ipv6_ra sont sur le vlan isolement darcs-hash:20091017130953-8fbb1-2af13a6472ad2f5fa3f1b02dffa2bab1e74374c8.gz --- radius_auth.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/radius_auth.py b/radius_auth.py index de2d91f8..60dd44db 100644 --- a/radius_auth.py +++ b/radius_auth.py @@ -53,6 +53,10 @@ def do_auth(mac): if 'bloq' in m[0].blacklist_actif(): return (-1, "Bloquage total des services pour cette machine", "") + # les gens qui doivent être isolés + if 'virus' in m[0].blacklist_actif() or 'ipv6_ra' in m[0].blacklist_actif() : + return (0, "Bad boy", "isolement") + # L'adherent ne paie pas, on le met sur le vlan radin if ((not isinstance(proprio, Club) and not proprio.adherentPayant()) or \ ('Nounou' in proprio.droits() and AddrInNet(m[0].ip(),'10.42.0.0/16'))):