Skip to content

bpo-38907: Add IPv6 Dual-Stack control for http.server #17378

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

Closed
wants to merge 1 commit into from
Closed

bpo-38907: Add IPv6 Dual-Stack control for http.server #17378

wants to merge 1 commit into from

Conversation

zkonge
Copy link
Contributor

@zkonge zkonge commented Nov 25, 2019

Make it possible to control IPv4/IPv6 Dual Stack state in http.server.

https://bugs.python.org/issue38907

Make it possible to control IPv4/IPv6 Dual Stack state in http.server.
@jaraco
Copy link
Member

jaraco commented Jan 6, 2020

Is there reason to think someone will want IPv6-only behavior? If not, perhaps the command-line parameter can be eliminated. In GH-17851, I've taken a more surgical approach that avoids altering the HTTPServer or the command-line interface.

If this command-line argument is desirable, I'd recommend --dual-stack={on,off,auto} with default of on and the values corresponding to how setsockopt IPv6ONLY is called:

  • auto: not called
  • on: called with 0
  • off: called with 1

@zkonge
Copy link
Contributor Author

zkonge commented Jan 6, 2020

I think there is no special reason to keep the IPv6-only function, I just want the backward compatibility when I create this patch.
Microsoft also keeps the "IPv6 Dual-Stack" off. Maybe very few people need it. For example, a server between Internet and Intranet, administrator don't want Intranet user access the server by IPv6.
↑Firewall would be better

@jaraco
Copy link
Member

jaraco commented Jan 6, 2020

Okay, so if the main motivation was to retain backward compatibility, that's no longer an issue, as it was unintentional not to be binding dual-stack. In my experience on the CherryPy project, binding dual stack has never been a concern. If a service binds IPv6, they almost always want IPv4 connectivity as well. I'd recommend to defer adding the option until someone requests it, which I think is unlikely to happen, or until someone adds the option to the HTTPServer API, in which case the CLI could support that interface.

@vstinner vstinner closed this May 3, 2021
@vstinner vstinner deleted the branch python:master May 3, 2021 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants