File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ def task(amapping_blacklist, ip_list):
7777 if delay != None and ip in amapping_blacklist :
7878 amapping_blacklist .remove (ip )
7979 time .sleep (1 )
80+
81+ ip_list = set ()
82+ for item in Amapping .values ():
83+ for key , value in item .items ():
84+ if key == 'ttl' : continue
85+ ip_list .update (value .split (' ' ))
8086 thread = threading .Thread (target = task , args = (amapping_blacklist , ip_list ))
8187 thread .setDaemon (True )
8288 thread .start ()
@@ -97,12 +103,7 @@ def prepare_run(run_env):
97103 NSmapping = loadconfig (conf ['NSFILE' ])
98104 SOAmapping = loadconfig (conf ['SOAFILE' ])
99105 AmappingBlacklist = set ()
100- ip_list = set ()
101- for item in Amapping .values ():
102- for key , value in item .items ():
103- if key == 'ttl' : continue
104- ip_list .update (value .split (' ' ))
105- prepare_ip_blacklist (AmappingBlacklist , ip_list )
106+ prepare_ip_blacklist (AmappingBlacklist , Amapping )
106107 # set up a resolver that uses the mapping or a secondary nameserver
107108 dnsforward = []
108109 for i in conf ['dnsforward_ip' ]:
You can’t perform that action at this time.
0 commit comments