diff --git a/nodedb.py b/nodedb.py index d0d081d..5a92231 100644 --- a/nodedb.py +++ b/nodedb.py @@ -280,47 +280,3 @@ def is_similar(a, b): # These addresses look pretty similar! return delta < 8 - -def is_derived_mac(a, b): - if a == b: - return True - - try: - mac_a = list(int(i, 16) for i in a.split(":")) - mac_b = list(int(i, 16) for i in b.split(":")) - except ValueError: - 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[5] += 1 - x[5] %= 255 - if mac_b == x: - return True - - x[0] |= 2 - if mac_b == x: - return True - - x[3] += 1 - x[3] %= 255 - if mac_b == x: - return True - - x = list(mac_a) - x[0] |= 2 - x[5] += 2 - x[5] %= 255 - if mac_b == x: - return True - - x = list(mac_a) - x[0] |= 2 - x[3] += 1 - x[3] %= 255 - if mac_b == x: - return True - - return False