-
Notifications
You must be signed in to change notification settings - Fork 7.9k
IPv6 support for php-fpm (fixes: #55508) #631
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
Conversation
@@ -55,7 +55,7 @@ | |||
; Default Value: 0 | |||
;emergency_restart_threshold = 0 | |||
|
|||
; Interval of time used by emergency_restart_interval to determine when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, but could you fix these silly space issues? :)
fixed and rebased |
+1 please, php-fpm is the last component in our internal network that does not support ipv6, we would love to kill ipv4 internally :) |
Yes I agree; we have the exact same problem. Everything runs over ipv6 but our firewalls need to make 1 exception because fpm cannot handle ipv6. The only alternative is running an instance of socat to convert ipv6 to ipv4.... |
+1000 this would kill the last IPv4 dep |
+1! |
Yes please! |
Is somebody going to take a look at this before PHP 5.6? |
💯 What happens when one enters only port? Will it listen on both IPv4 and IPv6? |
Ping @Tyrael, what do you think? Possible for 5.6? |
We are too deep into the release release (we already had an RC2, feature freeze since beta1) to have this in 5.6, but we I would like to see this in master. Sorry that we missed this, I will try to do a better job with keeping up with the pull requests, but if you see an rfc not getting the deserved attention, feel free to drop a reminder email to [email protected] |
@Tyrael This looks like a minor, self-contained feature addition. Can't we add that in 5.6.1? Unless I misunderstand the impact, this could also go to 5.5. |
Bump. |
Surprisingly, this can be added in RC4: "Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option" a51bf0c No references to a pull request, bug report or whatsoever. An individual PHP develeoper with git access can do whatever they want. A pull request for IPv6 support which should have been added 5 years ago, with multiple votes and issues on bugs.php.net cannot be merged "because of feature freeze". Strange... |
indeed this is pretty absurd... |
I'm all right to have this added to 5.5 |
if (addr != NULL) { | ||
addr_len = strlen(addr); | ||
if (addr[0] == '[' && addr[addr_len - 1] == ']') { | ||
addr[addr_len - 1] = '\0'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like replacing ']' by \0 which seems strange to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpauli if the user enters an ipv6 address with the [ip]:port format those [ and ] have to be removed. This line you pointed just deletes the ] in the last char and the next line addr++;
deletes the [ in the first char
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I see now
@arjenschol Thanks for catching this, I've just sent an email to the author to revert |
+1 lets get rid of legacy IP. |
Now 5.6.0 is released, can this be pulled into the 5.6 branch for release in 5.6.1? |
From the thread above it seems you should have it into 5.5 and merge it On Fri, Aug 29, 2014 at 12:01 PM, Arjen [email protected] wrote:
|
I would be fine having this in 5.6.1, as it shouldn't have any impact for existing fpm deployments, but people can opt-in to listen on the v6 address with the new config option. |
Yes sure, it can go to 5.5 as well |
this must be a joke or something... |
@jpauli so what are we waiting for merging this? |
This is sad. So much ignorance... 😟 |
Also, noone yet answered my question:
|
@Majkl578 i can't guarantee that without testing it but looking at the code it should open connections for both ipv4 and ipv6 if you only set the port :) |
Bump again, ping @Tyrael + @jpauli. This is really getting awkward... @acasademont: Thanks, that's how it should work, I was just curious whether the implementation is aware of that. :) |
Bump. |
hi, I've merged the patch into 5.5 and upwards. |
thank you all! this is awesome news :D |
Hey @globin , I consistently see sapi/fpm/tests/003.phpt fails with:
|
This change (or another FPM related change in version 5.5.19 and 5.6.3) seems to break PHP-FPM when using the network stack. It can be reproduced e.g. on Ubuntu 14.04 by creating 5 different pools (port numbers 9001 to 9005) and then starting the PHP-FPM service. I would expect to have a listener on each of the five ports, instead only the first pool is actually loaded. The others fail to load (can e.g. be checked with I had to downgrade to version 5.5.18/5.6.2 to fix the issue. |
@leofeyer I have reported a similar bug for that @ https://bugs.php.net/bug.php?id=68420. I don't think posting bugs in the comments of PR is a good idea |
@SjonHortensius Thanks, but this bug seems to handle a different issue, so I have created a separate one: https://bugs.php.net/bug.php?id=68423 |
This removes hardcoded IPv4 code and adds support for IPv6