diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index fd1e303a..9eb689dc 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -510,7 +510,7 @@ def _recheck_single_unknown_info(configmanager, info): def safe_detected(info): - if 'hwaddr' not in info: + if 'hwaddr' not in info or not info['hwaddr']: return if info['hwaddr'] in runningevals: # Do not evaluate the same mac multiple times at once diff --git a/confluent_server/confluent/discovery/protocols/pxe.py b/confluent_server/confluent/discovery/protocols/pxe.py index 0d596415..f1003013 100644 --- a/confluent_server/confluent/discovery/protocols/pxe.py +++ b/confluent_server/confluent/discovery/protocols/pxe.py @@ -92,7 +92,7 @@ def snoop(handler): rq = bytearray(rq) if rq[0] == 1: # Boot request addrlen = rq[2] - if addrlen > 16: # max address size in bootp is 16 bytes + if addrlen > 16 or addrlen == 0: continue netaddr = rq[28:28+addrlen] netaddr = ':'.join(['{0:02x}'.format(x) for x in netaddr])