-
IPv6 is supported right now, the problem is more related to installations with both protocols enabled or with installation with one protocol enabled and s2s peer with both. So the task consists of following elements:
-
Detecting what protocols are supported locally (what IPs are assigned to local interfaces)
-
Detecting whether remote host is IPv4 or IPv6 and react appropriately. That is, if locally only IPv4 is supported and remote host offers both protocols, only IPv4 IP address should be used.
It seems that all changes required for this to work can be done only in DNSResolver in tigase-utils package.
-
-
Ooo… polski tu obowiązuje? To się nie muszę wysilać… ;)
Tu nie zupełnie chodzi o „obsługę IPv6”… Tigase nie łączy się z moim serwerem, z którym powinien się połączyć każdy serwer XMPP, niezależnie czy ma obsługę IPv6, czy jej nie ma, czy ma ją spieprzoną. Rekord SRV o największym priorytecie wskazuje na hosta tylko z adresem IPv4. Serwer XMPP nie powinien nawet brać pod uwagę adresu IPv6 (w kolejnym rekordzie SRV) dopóki nie spróbuje się do tego IPv4 połączyć… To należałoby poprawić przed próbą dodania IPv6.
Zajrzałem do Waszego kodu zobaczyć co tam może być źle…
Metoda getHostSRV_Entries() (linie 209-302)
Pobierane są rekordy SRV z DNS, nawet są parsowane parametry 'prio' i 'weight'… ale potem olewane. O ile w przypadku 'weight' to najwyżej spowoduje nieoptymalne obciążenie na docelowym klastrze, to olewanie 'prio' może powodować próby połączenia z niedostępnym serwerem, gdy podstawowy jest dostępny…
Ale to jeszcze nic… bardziej podejrzana wydaje mi się linia 265: jeżeli dla hostname wskazanego przez rekord SRV nie uda się znaleźć adresu IP, to pozostałe rekordy SRV nie będą nawet sprawdzane. Jeżeli 'UnknownHostException' nie jest 'NamingException', to właściwie wszystkie rekordy SRV będą olane, dobrze mi się wydaje?
Myślę, że najpierw należałoby poprawić obsługę SRV, a obsługę IPv6 zostawić na później, jako 'ekstra ficzer'.
-
Thanks a lot for your comments. These are very informative and helpful, even though they are in Polish and other ppl most likely won't understand them :-)
In any case this gives me a good idea what to fix. It should not be too hard to get it working correctly now.
-
Ok, it is not yet a proper IPv6 support with detecting what kind of addresses are available and which to use but at least now DNSResolver takes SRV record with the highest priority and also if there is any problem with one of SRV records, the logic skips the record and tries others.
Type |
New Feature
|
Priority |
Critical
|
Assignee | |
RedmineID |
126
|
Estimation |
0
|
as in subject :)