From f8b515e0218e5011044f5e2ebc49bcdc4a0b8e7a Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 4 Mar 2018 19:04:45 +0800 Subject: filter/dns: next_serial do not query the registry nameserver --- filter_plugins/dns.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'filter_plugins') diff --git a/filter_plugins/dns.py b/filter_plugins/dns.py index 89f2159..7f1da54 100644 --- a/filter_plugins/dns.py +++ b/filter_plugins/dns.py @@ -9,7 +9,6 @@ The templating is done on the local/control machine! import os import datetime -import random import shlex import subprocess @@ -49,15 +48,7 @@ def next_serial(fqdn): if cmd_path is None: raise Exception("Cannot find %s" % cmd) - def query_nameservers(fqdn, ns=None): - return [line[0] for line in run_query(cmd_path, "NS", fqdn, ns)] - - # Get a registry nameserver. - reg_ns = random.choice(query_nameservers(".".join(fqdn.split(".")[1:]))) - - nss = query_nameservers(fqdn, reg_ns) - random.shuffle(nss) - + nss = [line[0] for line in run_query(cmd_path, "NS", fqdn)] current_serial = None for ns in nss: try: -- cgit v1.2.2