@@ -82,6 +82,9 @@ def prepare_run(run_env):
8282
8383 run_env ['finder' ] = Finder
8484
85+ listen_tcp_port = conf ['listen' ]['tcp' ]
86+ listen_udp_port = conf ['listen' ]['udp' ]
87+
8588 # set up a resolver that uses the mapping or a secondary nameserver
8689 dnsforward = []
8790 for i in conf ['dnsforward_ip' ]:
@@ -95,8 +98,8 @@ def prepare_run(run_env):
9598 caches = [cache .CacheResolver ()], clients = [SmartResolver ])
9699 p = dns .DNSDatagramProtocol (f )
97100 f .noisy = p .noisy = False
98- run_env ['tcp' ].append ([f , ip ])
99- run_env ['udp' ].append ([p , ip ])
101+ run_env ['tcp' ].append ([listen_tcp_port , f , ip ])
102+ run_env ['udp' ].append ([listen_udp_port , p , ip ])
100103
101104
102105def main ():
@@ -109,7 +112,7 @@ def main():
109112
110113 prepare_run (run_env )
111114 for e in run_env ['tcp' ]:
112- reactor .listenTCP (53 , e [0 ], interface = e [1 ])
115+ reactor .listenTCP (e [ 0 ] , e [1 ], interface = e [2 ])
113116 for e in run_env ['udp' ]:
114- reactor .listenUDP (53 , e [0 ], interface = e [1 ])
117+ reactor .listenUDP (e [ 0 ] , e [1 ], interface = e [2 ])
115118 reactor .run ()
0 commit comments