radius/auth wifi: fix mac "<automatique>"

This commit is contained in:
Daniel STAN 2014-07-08 14:39:42 +02:00
parent ba1217f48e
commit 9e13a851df

View file

@ -161,7 +161,7 @@ def register_mac(data, machine, conn):
return
mac = mac.decode('ascii', 'ignore').replace('"','')
try:
mac = lc_ldap.crans_utils.format_mac(value)
mac = lc_ldap.crans_utils.format_mac(mac).lower()
except:
radiusd.radlog(radiusd.L_ERR, 'Cannot format MAC !')
return
@ -250,6 +250,7 @@ def post_auth(data, conn):
if not items:
decision = 'accueil', 'Machine inconnue'
return radiusd.RLM_MODULE_NOTFOUND # TODO faire un truc plus propre
machine = items[0]
proprio = machine.proprio()