diff -r 63135113fe01 -r 951e4b70bad4 bin/pvl.hosts-dns --- a/bin/pvl.hosts-dns Mon Dec 16 20:49:50 2013 +0200 +++ b/bin/pvl.hosts-dns Mon Dec 16 20:50:04 2013 +0200 @@ -45,13 +45,20 @@ """ for host in hosts : - if not host.ip : + if prefix.version == 4 : + ip = host.ip + elif prefix.version == 6 : + ip = host.ip6 + else : + raise ValueError("%s: unknown ip version: %s" % (prefix, prefix.version)) + + if not ip : continue - if host.ip not in prefix : + if ip not in prefix : continue - yield host.ip, pvl.dns.zone.fqdn(host, host.domain) + yield ip, pvl.dns.zone.fqdn(host, host.domain) def process_hosts_reverse (options, hosts, prefix) : """