|
@@ -84,16 +84,14 @@ class BatmanParser:
|
|
|
|
|
|
# parse vis data
|
|
|
for item in visdata:
|
|
|
- itemid = ffstatus.mac2id(item.get('primary', item.get('router')))
|
|
|
+ itemmac = item.get('primary', item.get('router'))
|
|
|
+ itemid = ffstatus.mac2id(itemmac)
|
|
|
content = {
|
|
|
'aliases': [],
|
|
|
'neighbours': {},
|
|
|
'__UPDATED__': {'batctl': timestamp},
|
|
|
}
|
|
|
|
|
|
- if itemid in gateways:
|
|
|
- content['type'] = 'gateway'
|
|
|
-
|
|
|
neigh_id = ffstatus.mac2id(item.get('neighbor'))
|
|
|
if neigh_id is not None:
|
|
|
neigh_q = item.get('label', '0')
|
|
@@ -113,6 +111,11 @@ class BatmanParser:
|
|
|
|
|
|
itemid = ofid
|
|
|
content['aliases'].append(secid)
|
|
|
+ else:
|
|
|
+ if not 'mac' in content:
|
|
|
+ content['mac'] = itemmac
|
|
|
+ if itemid in gateways:
|
|
|
+ content['type'] = 'gateway'
|
|
|
|
|
|
if itemid in data:
|
|
|
data[itemid] = ffstatus.dict_merge(
|