-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: check net.ipv4.ip_unprivileged_port_start in parallel/test-cluster-bind-privileged-port #45838
Comments
Here's the output for me on Ubuntu 22.04.1 |
Yes, that's the default (and traditional UNIX behavior.) The test starts failing when it's <= 42. |
So, you're saying the test should be modified to check the range of reserved ports on the current system, rather than assuming that it will always be 42? |
The test should bail out with |
Can I take a try at this? I would write a function to find the first unprivileged port and then try to attach a process to the port just before the first unprivileged port. Then basically the same checks as before (making sure the exit code is 0, etc) Is this implementation fine? |
Go for it but I'd rather it just exits if port 42 is unprivileged. Principle of least surprise and all that. |
That makes sense, I'll send in a PR in some time! |
@bnoordhuis PTAL. |
Please ignore the second PR, I think it got added due to me changing branches locally and pushing. |
Can you link me to your PR? I can't find it for some reason. |
@bnoordhuis I messed up my Git locally and had to create a new PR. I hope you can see it now? |
PR-URL: #45904 Fixes: #45838 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #45904 Fixes: #45838 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #45904 Fixes: #45838 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #45904 Fixes: #45838 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This "fix" has meant that the test suite can not run on Linux kernels < 4.1 because that sysctl feature does not exist. |
I've put in the above PR #46536 - to fix v18 as well, do I just do another branch with a |
An update to test/parallel/test-cluster-bind-privileged-port.js checks the lowest privileged port to ensure 42 is privileged This only works on kernels > 4.1. On older kernels, this is locked at 1024 so the check is not needed. Fixes: #45838 PR-URL: #46536 Reviewed-By: Luigi Pinca <[email protected]>
An update to test/parallel/test-cluster-bind-privileged-port.js checks the lowest privileged port to ensure 42 is privileged This only works on kernels > 4.1. On older kernels, this is locked at 1024 so the check is not needed. Fixes: #45838 PR-URL: #46536 Reviewed-By: Luigi Pinca <[email protected]>
An update to test/parallel/test-cluster-bind-privileged-port.js checks the lowest privileged port to ensure 42 is privileged This only works on kernels > 4.1. On older kernels, this is locked at 1024 so the check is not needed. Fixes: #45838 PR-URL: #46536 Reviewed-By: Luigi Pinca <[email protected]>
An update to test/parallel/test-cluster-bind-privileged-port.js checks the lowest privileged port to ensure 42 is privileged This only works on kernels > 4.1. On older kernels, this is locked at 1024 so the check is not needed. Fixes: #45838 PR-URL: #46536 Reviewed-By: Luigi Pinca <[email protected]>
An update to test/parallel/test-cluster-bind-privileged-port.js checks the lowest privileged port to ensure 42 is privileged This only works on kernels > 4.1. On older kernels, this is locked at 1024 so the check is not needed. Fixes: nodejs/node#45838
An update to test/parallel/test-cluster-bind-privileged-port.js checks the lowest privileged port to ensure 42 is privileged This only works on kernels > 4.1. On older kernels, this is locked at 1024 so the check is not needed. Fixes: nodejs/node#45838
test/parallel/test-cluster-bind-privileged-port.js
expects binding to port 42 to fail but that's not an always-correct assumption.Check the output of
sysctl net.ipv4.ip_unprivileged_port_start
because it's possible (albeit unlikely) for that port to be unprivileged.Example output:
The text was updated successfully, but these errors were encountered: