mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Update mikrotikFindIPv6.py
This commit is contained in:
parent
14075ed763
commit
43fe3c2edf
@ -35,10 +35,15 @@ def pullMikrotikIPv6():
|
||||
list_binding6 = api.get_resource('/ipv6/dhcp-server/binding')
|
||||
entries = list_binding6.get()
|
||||
for entry in entries:
|
||||
try:
|
||||
clientAddressToIPv6[entry['client-address']] = entry['address']
|
||||
except:
|
||||
pass
|
||||
if len(entry['duid']) == 14:
|
||||
mac = entry['duid'][2:14].upper()
|
||||
macNew = mac[0:2] + ':' + mac[2:4] + ':' + mac[4:6] + ':' + mac[6:8] + ':' + mac[8:10] + ':' + mac[10:12]
|
||||
macToIPv6[macNew] = entry['address']
|
||||
else:
|
||||
try:
|
||||
clientAddressToIPv6[entry['client-address']] = entry['address']
|
||||
except:
|
||||
pass
|
||||
list_neighbor6 = api.get_resource('/ipv6/neighbor')
|
||||
entries = list_neighbor6.get()
|
||||
for entry in entries:
|
||||
|
Loading…
Reference in New Issue
Block a user