On Jun 12, 2007, at 10:42 PM, Matt Clark wrote:
>>>> r = dns.query.udp(q, '224.0.0.251', port=5353, timeout=5, > ignore_unexpected=True) > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "dns/query.py", line 118, in udp > _wait_for_readable(s, expiration) > File "dns/query.py", line 63, in _wait_for_readable > _wait_for([s], [], [s], expiration) > File "dns/query.py", line 60, in _wait_for > raise dns.exception.Timeout > dns.exception.Timeout > > Whoops! This is actually the intended behavior. "ignore_unexpected" does not mean "responses from unexpected sources are OK"; it means "do not raise an error if you get an unexpected reply; just drop it and keep waiting for the real reply". The real issue here is that you're doing multicast DNS and dnspython doesn't have any smarts about that. I think a better fix would be for dnspython to notice that destination is a multicast address and disable the address matching check. Probably we should also add explicit support for multicast DNS too, as dns.query.udp is only going to be good for the "one query, one response "style of mDNS. It would be nice if there was a way to do the "one query, accumulating responses" style too. /Bob _______________________________________________ dnspython-bugs mailing list [email protected] http://woof.play-bow.org/mailman/listinfo/dnspython-bugs
