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))