From ae83dac93448b7b56f89f799f0806aeb3bd64fe3 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Thu, 12 Mar 2015 21:21:33 +0100 Subject: [PATCH] =?UTF-8?q?auth.py:=20tromp=C3=A9=20d'1bit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freeradius/auth.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freeradius/auth.py b/freeradius/auth.py index bbf81d40..34f6ccba 100644 --- a/freeradius/auth.py +++ b/freeradius/auth.py @@ -339,7 +339,7 @@ def authorize_nas(data, ldap): # EUI64, hein ? assert ((addr >> 24) & 0xffff) == 0xfffe # Extrait la mac de l'EUI64 (« trust me, it works ») - mac = (addr >> 16) & (0xffffff << 24) ^ (addr & 0xffffff) ^ (1 << 42) + mac = (addr >> 16) & (0xffffff << 24) ^ (addr & 0xffffff) ^ (1 << 41) mac = lc_ldap.crans_utils.format_mac("%012x" % mac) m_filter = u'(macAddress=%s)' % mac @@ -354,8 +354,9 @@ def authorize_nas(data, ldap): shortname = "wifi" vserver = 'inner-tunnel' else: + logger.info('not found %r' % m_filter) return radiusd.RLM_MODULE_NOTFOUND - elif unicode(machines[0]['host'][0]).startswith('bat'): + elif unicode(machines[0]['host'][0]).startswith(u'bat'): password = radius_password('radius_key', machines[0]) shortname = 'switchs' vserver = 'filaire'