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: T6365: remove warnings for negated interface selections by name (backport #3482) #3504

Merged
merged 3 commits into from
May 23, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 22, 2024

Change Summary

Avoids spam of invalid warnings when a negated interface name is used.

...
WARNING: NAT interface "!bond0.2" for destination NAT rule "430" does
not exist!
WARNING: NAT interface "!bond0.2" for destination NAT rule "450" does
not exist!
WARNING: NAT interface "!bond0.2" for destination NAT rule "470" does
not exist!
WARNING: NAT interface "!bond0.2" for destination NAT rule "490" does
not exist!
WARNING: NAT interface "!bond0.2" for destination NAT rule "510" does
not exist!
...

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/T6365

Related PR(s)

none

Component(s) name

  • nat source
  • nat destination

Proposed changes

Added code to parse negation (in a similar manner groups are used).

How to test

set nat destination rule 10 description 'DNS'
set nat destination rule 10 destination address 10.0.0.1
set nat destination rule 10 destination port 53
set nat destination rule 10 inbound-interface name '!eth0'
set nat destination rule 10 protocol 'tcp_udp'
set nat destination rule 10 translation address 172.16.0.1

And perform a commit.

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
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

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

@github-actions github-actions bot added the sagitta VyOS 1.4 LTS label May 22, 2024
@c-po c-po requested review from a team, dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team May 22, 2024 18:07
@dmbaturin dmbaturin merged commit 7279f74 into sagitta May 23, 2024
4 of 5 checks passed
@mergify mergify bot deleted the mergify/bp/sagitta/pr-3482 branch May 23, 2024 09:21
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