From e15b3beb71e4773f184dd0e557594c72ea1502af Mon Sep 17 00:00:00 2001 From: Daniel Stan Date: Thu, 10 May 2012 12:57:24 +0200 Subject: [PATCH] [radius_auth] partial hostname Ignore-this: eff2c986b3f0d4cd57b255a74cf748c darcs-hash:20120510105724-ce021-5d351971a6bc8964ae03e3438294e77cde37c046.gz --- radius_auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radius_auth.py b/radius_auth.py index 50460950..7ac5a720 100644 --- a/radius_auth.py +++ b/radius_auth.py @@ -92,7 +92,7 @@ if __name__ == '__main__' : # On logue la prise sur laquelle a lieu la tentative openlog("radius_auth.py") - switch = os.getenv("NAS_IDENTIFIER", "").replace('"', '') + switch = os.getenv("NAS_IDENTIFIER", "").replace('"', '').split('.')[0] prise = (len(switch) == 6 and (switch[3] + switch[5]) or (switch + "-")) prise += "%02d" % int(os.getenv("NAS_PORT", 0)) syslog("%s -> %s [%s]" % (prise, mac, msg))