Projects tigase _server tigase-utils Issues #1
Add IPv6 support (#1)
Closed
Bartosz Małkowski opened 1 decade ago
Due Date
2017-03-02

as in subject :)

Artur Hefczyc commented 1 decade ago

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:

  1. Detecting what protocols are supported locally (what IPs are assigned to local interfaces)

  2. 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.

Artur Hefczyc commented 1 decade ago

Moved to Tigase Utils project as this is where the coding takes place.

Artur Hefczyc commented 1 decade ago

Czyżby Tigase widząc rekord AAAA (adres IPv6) dla docelowego serwera używa IPv6 i jak to nie działa (bo np. Tigase nie ma publicznego adresu IPv6) nie robi poprawnego fall-back do IPv4?

Jacek Konieczny commented 1 decade ago

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…

https://projects.tigase.org/projects/tigase-utils/repository/changes/trunk/src/main/java/tigase/util/DNSResolver.java

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'.

Artur Hefczyc commented 1 decade ago

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.

Artur Hefczyc commented 1 decade ago

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.

Artur Hefczyc commented 8 years ago

I think, the IPv6 support is not properly implemented. %bmalkow , %andrzej.wojcik please confirm and close the ticket.

Andrzej Wójcik (Tigase) commented 8 years ago

%kobit I'm not sure if it is properly implemented or not but Tigase connects to IPv6 addresses when possible and accepts incoming connections on IPv6 addresses if server hosting Tigase contains IPv6 address - so for me it works properly.

Artur Hefczyc commented 8 years ago

Ok, in such a case we can consider it resolved and close the ticket. If any problem is reported we will open a bug report for this then.

issue 1 of 1
Type
New Feature
Priority
Critical
Assignee
RedmineID
126
Estimation
8h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-utils#1
Please wait...
Page is in error, reload to recover