Skip to content

Conversation

@ottigeda
Copy link
Contributor

According to RFC 3493 the socket option IPV6_V6ONLY
should be off by default, see
https://tools.ietf.org/html/rfc3493#page-22 (chapter 5.3).

However this does not seem to be the case on all systems.
For instance on any Windows OS, the option is on by default.

Therefore clear this option in order to allow
an server socket which can support IPv6 and IPv4 at the same time.

Would this change be acceptable to you ?
Or should I make it configurable, using an #define or an param on the server class ?

@ottigeda
Copy link
Contributor Author

As it seems to me, the test on "Travis CI" can connect to "127.0.0.1" but not to "::1".
Do you know if that is a problem of my code, or is this rather related to the system the test is running on ? Do you know what could be the difference ?

@ottigeda ottigeda force-pushed the dual-stack-server branch from a91a6cf to e01337d Compare April 28, 2020 08:36
@yhirose
Copy link
Owner

yhirose commented May 1, 2020

@ottigeda, sorry for the late reply. I actually don't know why. But ipv6 support seems to be disabled on the TravisCI. https://github.com/njh/travis-ipv6-test

If you think TravisCI is not trustworthy as for IP network, I don't mind retiring it since I can now test Mac OS and Linux on GitHub Action.

@ottigeda
Copy link
Contributor Author

ottigeda commented May 2, 2020

I think it should really be you to decide that.
However in my opinion supporting IPv6 becomes more important, since the IPv4 addresses are in short supply these days.
It is for sure still an long way to go for IPv6, but if the infrastructure does not support it,
it is difficult to make progress in applications to make them support it.

According to RFC 3493 the socket option IPV6_V6ONLY
should be off by default, see
https://tools.ietf.org/html/rfc3493#page-22 (chapter 5.3).

However this does not seem to be the case on all systems.
For instance on any Windows OS, the option is on by default.

Therefore clear this option in order to allow
an server socket which can support IPv6 and IPv4 at the same time.
@ottigeda ottigeda force-pushed the dual-stack-server branch from e01337d to 0d7bc7a Compare May 2, 2020 20:40
@yhirose yhirose merged commit b2203bb into yhirose:master May 5, 2020
@yhirose
Copy link
Owner

yhirose commented May 5, 2020

@ottigeda, I removed TravisCI test. Thank you for your contribution!

ExclusiveOrange pushed a commit to ExclusiveOrange/cpp-httplib-exor that referenced this pull request May 2, 2023
According to RFC 3493 the socket option IPV6_V6ONLY
should be off by default, see
https://tools.ietf.org/html/rfc3493#page-22 (chapter 5.3).

However this does not seem to be the case on all systems.
For instance on any Windows OS, the option is on by default.

Therefore clear this option in order to allow
an server socket which can support IPv6 and IPv4 at the same time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants