[Twisted-Python] Patch to improve usability of DNS caching

Tommi Virtanen tv at twistedmatrix.com
Sun Jun 1 13:40:13 EDT 2003


	Hi. At http://twistedmatrix.com/~tv/dnscache.patch there is a
	patch that adds some things to twisted.names:

	1. Make the resolv.conf location configurable at mktap time.

	2. Reload resolv.conf regularly. resolv_read_interval is the
	   time period, in seconds; currently 60.

	3. Note that pickServer may now return None, if there are no
	   hardcoded servers and resolv.conf is empty/cannot be read.

	This allows me to run a local DNS server bound to
	127.0.0.1:53, list that in /etc/resolv.conf, make my DHCP
	client write it's resolv.conf to
	/var/run/dhclient.resolv.conf, and point my local DNS server
	to that.

	And all this because glibc doesn't reread /etc/resolv.conf for
	long-living processes. And because I want to control the
	.local namespace..

-- 
:(){ :|:&};:




More information about the Twisted-Python mailing list