From d98336b319a569b1ca73a3605ae817634ed350a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20H=C3=A4ll?= Date: Sun, 17 Nov 2019 23:15:41 +0100 Subject: [PATCH 1/2] no ipv6 in the ipv4 dhcp plz --- modules/lib/sqlite2dhcp_scope.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lib/sqlite2dhcp_scope.py b/modules/lib/sqlite2dhcp_scope.py index 48d68fa4..299cd6fb 100755 --- a/modules/lib/sqlite2dhcp_scope.py +++ b/modules/lib/sqlite2dhcp_scope.py @@ -97,7 +97,7 @@ 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 From 873bd8849e913853d9c61bedc9c5469001f6b174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20H=C3=A4ll?= Date: Sun, 17 Nov 2019 23:23:32 +0100 Subject: [PATCH 2/2] Update sqlite2dhcp_scope.py --- modules/lib/sqlite2dhcp_scope.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lib/sqlite2dhcp_scope.py b/modules/lib/sqlite2dhcp_scope.py index 299cd6fb..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 and ipv4_addr_txt is not null""") + 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