-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for IPv6 connections #767
Conversation
It would appear I'm getting different test results on CI than I did locally and there's an error. I just got travis-ci working on my fork, I'll investigate. |
Unfortunately for me it looks like ipv6 is unavailable on Travis CI https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system |
I'm still looking into the CI results, a run from my fork passed but it's possible I could have caused an intermittent error. |
Ipv6 results are not used yet
Listen server currently ipv6 that accepts ipv4 connection
Fix windows clang compile error "lastNetworkError unused"
Okay I've update this to incorporate the changes from #770 (I needed to replace the colons in ipv6 addresses with a different character as they were not valid for a windows filename, I chose a semicolon as that is not a valid character for a hostname). Something to note, the PROTOCOL_VERSION bump could be removed, the downside would be that any newer worker with an ipv6 address would be unconnectable if the client wasn't updated, however any ipv4 connections should continue to work as before. |
Description
This change updates the networking code to accept IPv6 connections by changing the listen server to create an IPv6 socket that also accepts IPv4 connections.
I ensured the remote connection worked correctly on Windows with hostnames being resolved to both IPv4 & IPv6. I wasn't able to test with multiple machines on Linux or MacOS however all code compiled locally and the connection unit tests I added passed and the localhost connection was successful.
Any feedback is appreciated. I'll also say I'm not an expert in networking code so this was written with the help of a lot of documentation.
Please provide details for the change or fix
Support for ipv6 is desired as servers in our data center are not allocated ipv4 ip addresses by default and it's preferred we only use ipv6 networking
Core/Process/Semaphore.cpp\h
Core/Network/Network.cpp\h
Core/Network/TCPConnectionPool.cpp\h
Core/CoreTest/TestNetwork.cpp
Core/CoreTest/TestTCPConnectionPool.cpp
Core/CoreTest/TestMain.cpp
Tools/FBuild/FBuildCore/Protocol/Server.cpp
Tools/FBuild/FBuildCore/Protocol/Protocol.h
Checklist
The pull request