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

Fix /0 IP mask being set to /32 or /128 #30

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

jakubman1
Copy link
Contributor

Explicitly specifying /0 IP mask was being interpreted as it not being set at all. This PR fixes the issue.

Checks "if not mask:" would return True if mask was set to 0.
This would lead to mask being set to default value, which is /32 for
IPv4 and /128 for IPv6, which is not the intended behaviour, since
it prevented explicitly specifying full IP range (0.0.0.0/0).
The mask would also not show up in dashboard.

This commit fixes the issue by checking the mask values for equality
to None.
@jirivrany jirivrany merged commit d481233 into CESNET:develop Jun 19, 2023
1 check passed
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