diff --git a/modules/lib/sqlite2dhcp_scope.py b/modules/lib/sqlite2dhcp_scope.py index 48d68fa4..dc62f384 100755 --- a/modules/lib/sqlite2dhcp_scope.py +++ b/modules/lib/sqlite2dhcp_scope.py @@ -97,7 +97,8 @@ def gen_hosts(self): c = self.db.cursor() c.execute("""select host.name, ipv4_addr_txt, option.value from host, option - where option.name='mac' and host.node_id = option.node_id""") + where option.name='mac' and host.node_id = option.node_id + and ipv4_addr_txt is not null""") host_index = collections.defaultdict(int) for row in c.fetchall(): host, ip, mac = row