Add IPv6 support to tcp, http, htsp and access system. #226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In all my tests this worked without any problems, but testing is highly appreciated.
It patches the tcp, http and htsp code to be compatible to the larger IPv6 addresses, without loosing IPv4 backwards compatiblity.
tcp_server_create now quries for available addresses via getaddrinfo, and prefers IPv6 if it's available.
By disabling sockopt IPV6_V6ONLY, which is default-off on most distributions, but not on all, the IPv6 socket also accepts IPv4 connects which are represented like ::FFFF:127.0.0.1.
The access system is modified to be aware of IPv6 addresses. In webui they work exactly the same way as IPv4 addresses.
I most likely did not test in all possible conditions, but i tried to find all places where the address family matters.