--- a/bin/pvl.hosts-dns Mon Dec 16 21:15:25 2013 +0200
+++ b/bin/pvl.hosts-dns Mon Dec 16 21:15:42 2013 +0200
@@ -4,6 +4,7 @@
import pvl.hosts
import pvl.dns.zone
+import fnmatch
import ipaddr
import logging; log = logging.getLogger('pvl.hosts-dns')
import optparse
@@ -14,7 +15,15 @@
"""
for host in hosts :
- if options.forward_zone and host.domain != domain :
+ if not options.forward_zone :
+ pass
+ elif host.domain == domain :
+ pass
+ elif pvl.dns.zone.join('*', host.domain) == domain :
+ pass
+ elif fnmatch.fnmatch(host.domain, domain) :
+ pass
+ else :
continue
if host.ip :