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

NAT: T6371: fix NAT op mode when list of ports/ranges configured (backport #3532) #3545

Merged
merged 1 commit into from
May 30, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 29, 2024

Change Summary

Before: Issuing the op mode command "show nat source rules" will throw an exception if the user has configured NAT rules using a list of ports as a comma-separated list (e.g. '!22,telnet,http,123,1001-1005'). Also there was no handling for the "!" rule and so '!53' would display as '53'.

With this PR: Introduced iteration to capture all configured ports and append to the appropriate string for display to the user as well as handling of '!' if present in user's configuration.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T6371

Related PR(s)

Component(s) name

Proposed changes

See change summary above.

How to test

Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • [N/A] My change requires a change to the documentation
  • [N/A] I have updated the documentation accordingly

This is an automatic backport of pull request #3532 done by [Mergify](https://mergify.com).

…ted list of ports/ranges exists

Before: Issuing the op mode command "show nat source rules" will throw an
exception if the user has configured NAT rules using a list of ports as a
comma-separated list (e.g. '!22,telnet,http,123,1001-1005'). Also there was
no handling for the "!" rule and so '!53' would display as '53'.

With this PR: Introduced iteration to capture all configured ports and append
to the appropriate string for display to the user as well as handling of '!' if
present in user's configuration.

(cherry picked from commit b7595ee)
@mergify mergify bot requested a review from a team as a code owner May 29, 2024 18:29
@github-actions github-actions bot added the sagitta VyOS 1.4 LTS label May 29, 2024
@c-po c-po enabled auto-merge May 29, 2024 19:10
@c-po c-po merged commit 516167f into sagitta May 30, 2024
6 checks passed
@mergify mergify bot deleted the mergify/bp/sagitta/pr-3532 branch May 30, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sagitta VyOS 1.4 LTS
Development

Successfully merging this pull request may close these issues.

3 participants