Skip to content
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

server.sysctl: handle 0 integer values correctly #1293

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

lemmi
Copy link
Contributor

@lemmi lemmi commented Feb 15, 2025

Previously, sysctl operations would incorrectly trigger changes when checking against zero values since not 0 is True in python.

This drops checking the existing_value and relies on the comparison against the desired value instead.

Added test case verifying correct noop behavior when sysctl value is 0.

Previously, sysctl operations would incorrectly trigger changes when
checking against zero values since `not 0` is `True` in python.

This drops checking the existing_value and relies on the comparison
against the desired value instead.

Added test case verifying correct noop behavior when sysctl value matches zero.
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.

1 participant