diff --git a/batman.py b/batman.py index 1260ad1..c33f3e0 100755 --- a/batman.py +++ b/batman.py @@ -27,7 +27,10 @@ class batman: """ output = subprocess.check_output(["batctl","-m",self.mesh_interface,"vd","json","-n"]) lines = output.splitlines() - return self.vis_data_helper(lines) + vds = self.vis_data_helper(lines) + for vd in vds: + vd['legacy'] = True + return vds def vis_data_batadv_vis(self): """ Parse "batadv-vis -i -f json" into an array of dictionaries. diff --git a/nodedb.py b/nodedb.py index 8685c81..9dd9849 100644 --- a/nodedb.py +++ b/nodedb.py @@ -52,6 +52,8 @@ class NodeDB: except: node = Node() node.flags['online'] = True + if 'legacy' in x: + node.flags['legacy'] = True self._nodes.append(node) node.add_mac(x['of']) @@ -65,6 +67,8 @@ class NodeDB: except: node = Node() node.flags['online'] = True + if 'legacy' in x: + node.flags['legacy'] = True node.add_mac(x['router']) self._nodes.append(node)