IPv6 support in version 0.9.0

28 views
Skip to first unread message

Brian Pick

unread,
Jan 30, 2017, 5:07:04 PM1/30/17
to libstrophe
I am glad to see IPv6 support in version 0.9.0!
I am also glad to see the DNS resolver returns all the SRV records, this is great.

Question - The change log indicates support for returning all SRV records is according to RFC 2052 
"Resolver returns all SRV records instead of one. Lookup is performed according to RFC2052"
but this RFC does not really support IPv6, it only deals with IPv4 A records, RFC 2782 obsoletes RFC 2052 and supports IPv6 AAAA records.

Is there a chance that since 0.9.0 supports IPv6 that the DNS resolver also supports RFC 2782 and will return AAAA records?


Dmitry Podgorny

unread,
Jan 30, 2017, 6:37:05 PM1/30/17
to libstrophe
"Resolver" in libstrophe is a component which resolves SRV record into a list of domain names. Further resolving (A / AAAA) is done by system via getaddrinfo(3).

For example:

    set type=SRV
    _xmpp-client._tcp.jabber.org

    Non-authoritative answer:
    _xmpp-client._tcp.jabber.org    service = 30 30 5222 hermes2.jabber.org.
    _xmpp-client._tcp.jabber.org    service = 31 30 5222 hermes2v6.jabber.org.

According to RFC a client must contact with hermes2.jabber.org first. But this name has only A record. Therefore, if you have both IPv4 and IPv6 networks you will connect to IPv4 address. And if you have only IPv6 network, connection to hermes2.jabber.org will fail and on the next step you will connect to hermes2v6.jabber.org which has only AAAA record.

I'll check RFC 2782, thanks for mention.
Reply all
Reply to author
Forward
0 new messages