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

extend validate_port to port range #90

Closed
wants to merge 3 commits into from
Closed

Conversation

a3an-k
Copy link

@a3an-k a3an-k commented Aug 26, 2024

validaten of Ports accept new also port Ranges and checkts if the ports are within the allowed Portranges

@ansibleguy
Copy link
Owner

ansibleguy commented Aug 27, 2024

@a3an-k Could you provide a link to the port-range feature you are referring to?

The option to use aliases and port-ranges in rules was fixed already: #86 (by disabling client-side port validation completely)

I can't find any link to this validation for the alias module.

The Alias docs state that a range needs to be 29:49 NOT 29-49 => https://docs.opnsense.org/manual/aliases.html#alias-types
I confirmed this using the WebUI.

The validate_port function is used in multiple modules/places - a port-range is not a valid option for all use-cases. So I would make it optional with an opt-in flag.

@ansibleguy ansibleguy marked this pull request as draft August 27, 2024 18:32
@ansibleguy ansibleguy closed this Sep 11, 2024
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.

3 participants