On Tue, 6 Nov 2012 21:35:54 +0400, HoverHell wrote
> On Tue, Nov 6, 2012 at 9:26 PM, R. Mattes <[email protected]> wrote:
> > But still: service discovery is optional. XMPP clients shouldn't stop
> > working when no server record is found. BTW, even if I'm online and
> > a real DNS server is available I'm pretty shure it won't find a
> > xmpp SRV record for localhost
>
> It doesn't stop working when no SRV record is found. But when a DNS
> server to query is not [UTF-8?]found⦠[UTF-8?]uh⦠not sure, maybe it
should stop
> working (or, as you've noticed, *retry*); for example, to avoid a
> situation where accidental timeout from DNS could mean connecting to
> a wrong server (an unlikely but possibly quite confusing occasion).
But isn't that a solved problem? O.k. twisted seems to ignore the whole
name lookup configuration (/etc/nsswitch.conf). But even then, for
A records it's pretty much: query server A, ... timeout, query server B,
... timeout, ... fallback.
For XMPP it seem the RFC suggests:
SRV query ... (see above) ... fallback to A record (see above)
To me it seems as if the fallback to A record/hosts-file never happens.
Apropos timeout: the query to my non-existing local nameserver does
_not_ timeout - the program receives an 'ICMP Port unreachable'.
Retrying doesn't make sense with such an error response.
> > And why does the twisted.names code attempt to query a DNS server
> > on 127.0.0.1? Using 127.0.0.1/53 as a fallback seems like a really bad
> > idea ....
>
> Not *really* but yes, seems like a bad idea. Though I feel like there
> was some relevant reason, but can't remember
It's hardcoded into the client:
if not servers:
servers.append(('127.0.0.1', dns.PORT))
But that might be a nameserver serving another net. That's why there
is /etc/nsswitch.conf and /etc/hosts. The wrong answer often is worse than
no answer ;-)
Anyway, thanks for your input,
RalfD
>.>
> _______________________________________________
> Twisted-Jabber mailing list
> [email protected]
> https://mailman.ik.nu/mailman/listinfo/twisted-jabber
--
R. Mattes -
Hochschule fuer Musik Freiburg
[email protected]
_______________________________________________
Twisted-Jabber mailing list
[email protected]
https://mailman.ik.nu/mailman/listinfo/twisted-jabber