From 8fd0b73418b954d0ccbe44f8ad0d02103464efb1 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 9 May 2015 22:04:45 +0200 Subject: [PATCH] remove dependency on mesh_interfaces --- lib/nodes.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/nodes.py b/lib/nodes.py index d9543a8..2d0769d 100644 --- a/lib/nodes.py +++ b/lib/nodes.py @@ -11,6 +11,25 @@ def build_mac_table(nodes): macs[mac] = node_id except KeyError: pass + + try: + for mac in node['nodeinfo']['network']['mesh']['bat0']['interfaces']['wireless']: + macs[mac] = node_id + except KeyError: + pass + + try: + for mac in node['nodeinfo']['network']['mesh']['bat0']['interfaces']['tunnel']: + macs[mac] = node_id + except KeyError: + pass + + try: + for mac in node['nodeinfo']['network']['mesh']['bat0']['interfaces']['other']: + macs[mac] = node_id + except KeyError: + pass + return macs