-
Notifications
You must be signed in to change notification settings - Fork 395
vpp: T7972: Make nat44 no-forwarding feature automatically configurable
#4880
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
base: current
Are you sure you want to change the base?
Conversation
|
👍 |
|
@sever-sever All change requests were addressed |
sever-sever
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All my requests have been fulfilled.
Migrate NAT no-forwarding option to more clear CLI syntax/meaning
interface-definitions/vpp.xml.in
Outdated
| <regex>(static-dynamic|static-bypass)</regex> | ||
| </constraint> | ||
| </properties> | ||
| <defaultValue>static-dynamic</defaultValue> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the static-bypass option to be the default one?
How I read this.
- Before: by default,
nat44 forwardingwas enabled (nono-forwardingin CLI). - After: by default,
nat44 forwardingis disabled, becausestatic-dynamicis a default value andenable_forwarding = config['processing_mode'] == 'static-bypass'
Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made changes to PR. Now `forwarding' is enable or disabled automatically depending on static rules configuration
f0a55e4 to
9690fbb
Compare
nat44 no-forwarding feature name and description in CLInat44 no-forwarding feature automatically configurable
zdc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand, the logic appears incomplete. There are three possible configurations to consider:
- Only dynamic rules are configured.
- Both dynamic and static rules are configured.
- Only static rules are configured.
Here is a decision table outlining which forwarding option states are compatible with each configuration:
| Rules | Forwarding | Description |
|---|---|---|
| Dynamic | Disabled | All traffic on an "in" interface is processed by dynamic NAT rules. |
| Dynamic + Static | Disabled | All traffic on an "in" interface is processed by static (higher priority) or dynamic NAT rules. |
| Static | Enabled | Only traffic on an "in" interface matching static rules undergoes NAT; all other traffic is forwarded unchanged. |
In other words, the logic should actually be reversed. If you want to use a single condition to determine the forwarding status, it should be based on dynamic rules. If any dynamic rule is present in the configuration, forwarding must always be disabled - otherwise, those dynamic rules will not function as intended.
|
@zdc Yes, you are right! Thanks for pointing to this! |
zdc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I just want to see a bit more detailed comment on this, so no one will need to read the whole history next time
…able If any dynamic rule is configured forwarding should be disabled because each packet must be processed through the NAT session table to apply proper translations
|
CI integration 👍 passed! Details
|
Change summary
Automatically enable
nat44 forwardingif static rules are configuredTypes of changes
Related Task(s)
Related PR(s)
vyos/vyos-documentation#1717
How to test / Smoketest result
Checklist: