Merge pull request #16 from sargon/optimize-nodedb-py

nodedb.py: stop similar mac address check when parts are not equal
alfred-data
Nils Schneider 2014-02-04 13:02:38 -08:00
commit ef9d762c93
1 changed files with 3 additions and 0 deletions

View File

@ -324,6 +324,9 @@ def is_derived_mac(a, b):
except ValueError: except ValueError:
return False return False
if mac_a[4] != mac_b[4] or mac_a[2] != mac_b[2] or mac_a[1] != mac_b[1]:
return False
x = list(mac_a) x = list(mac_a)
x[5] += 1 x[5] += 1
x[5] %= 255 x[5] %= 255