From 2d1d576877edae984053d5642edb5826c88d5a73 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Tue, 29 Dec 2009 17:03:10 +0100 Subject: [PATCH] [radius_auth] Hack pour le G... darcs-hash:20091229160310-ffbb2-99091d9e1b6ff2d5999cc85038632df6ced1b67b.gz --- radius_auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radius_auth.py b/radius_auth.py index 60dd44db..d37e0d4d 100644 --- a/radius_auth.py +++ b/radius_auth.py @@ -40,7 +40,8 @@ def do_auth(mac): if len(m) == 0: return (0, "Mac inconnue", "accueil") elif len(m) > 1: - return (-1, "Pb recherche mac (nb résultat %d!=1)" % len(m), "") + if not m[0].proprietaire().chbre().startswith('G'): + return (-1, "Pb recherche mac (nb résultat %d!=1)" % len(m), "") # N'appartient pas au Crans et n'a pas de prise attribuée # donc sur uplink ou switch non filtré