On 04:25 pm, an...@iki.fi wrote: >I have external requirements that force me to issue DNS queries from a >specific local port range. I'm looking for a way to use the >twisted.names resolver but I need to specify a local port for a query >or set the local port range for all queries. I appreciate that the >local port randomization is there for good security reasons, but for >my application I do not care. I would be grateful for any tips or >guidelines on how to achieve this. > >For some ancient Twisted version I got it working by monkey patching >twisted.names.dns.DNSDatagramProtocol.startListening() to this effect. >This ugly hack of mine does not work anymore for any recent version of >Twisted. Is there a right way to do it?
We'd be happy to have such a feature officially supported. Would you like to work on a patch that adds a tested, documented hook for selecting the source port? Jean-Paul _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python