<automatique> pour les macs et u'' si pas d'ipv6
This commit is contained in:
parent
8f9c6c1d17
commit
99d864b81c
2 changed files with 10 additions and 2 deletions
|
@ -309,7 +309,9 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
|||
# La machine peut-elle avoir une ipv4 ?
|
||||
if 'v6' not in realm:
|
||||
uldif['ipHostNumber'] = [ unicode(crans_utils.ip4_of_rid(int(rid[0]))) ]
|
||||
uldif['ip6HostNumber'] = [ unicode(crans_utils.ip6_of_mac(uldif['macAddress'][0], int(rid[0]))) ]
|
||||
|
||||
ip6 = unicode(crans_utils.ip6_of_mac(uldif['macAddress'][0], int(rid[0])))
|
||||
uldif['ip6HostNumber'] = [ ip6 ] if ip6 else []
|
||||
|
||||
# Mid
|
||||
uldif['mid'] = [ unicode(self._find_id('mid', lockId=lockId)) ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue