From a6d7e4e1f362c034e29ec4a097c237d208ebe5c5 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Mon, 20 Aug 2012 23:44:31 +0200 Subject: [PATCH] modulo 255 when incrementing macs --- nodedb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodedb.py b/nodedb.py index a5ba8d5..359f7cc 100644 --- a/nodedb.py +++ b/nodedb.py @@ -325,6 +325,7 @@ def is_derived_mac(a, b): x = mac_a x[5] += 1 + x[5] %= 255 if mac_b == x: return True @@ -333,18 +334,21 @@ def is_derived_mac(a, b): return True x[3] += 1 + x[3] %= 255 if mac_b == x: return True x = mac_a x[0] |= 2 x[5] += 2 + x[5] %= 255 if mac_b == x: return True x = mac_a x[0] |= 2 x[3] += 1 + x[3] %= 255 if mac_b == x: return True