Skip to content

Commit 771b6c7

Browse files
authored
no ipv6 in the ipv4 dhcp plz (#238)
* no ipv6 in the ipv4 dhcp plz * Update sqlite2dhcp_scope.py
1 parent e98d890 commit 771b6c7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/lib/sqlite2dhcp_scope.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ def gen_hosts(self):
9797
c = self.db.cursor()
9898
c.execute("""select host.name, ipv4_addr_txt, option.value
9999
from host, option
100-
where option.name='mac' and host.node_id = option.node_id""")
100+
where option.name='mac' and host.node_id = option.node_id
101+
and ipv4_addr_txt is not null""")
101102
host_index = collections.defaultdict(int)
102103
for row in c.fetchall():
103104
host, ip, mac = row

0 commit comments

Comments
 (0)