Skip to content

NAT: Hook NAT table construction into mgmt #529

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

Merged
merged 3 commits into from
Jun 6, 2025
Merged

Conversation

qmonnet
Copy link
Member

@qmonnet qmonnet commented May 27, 2025

Based on #470

  • feat(nat): Optimize peerings before adding them to NAT tables
  • chore(nat): Derive Clone trait for NAT tables
  • feat(nat): Hook NAT tables creation into internal config build

Fixes: #472

@qmonnet qmonnet added this to the GW R1 milestone May 27, 2025
@qmonnet qmonnet requested a review from Fredi-raspall May 27, 2025 16:51
@qmonnet qmonnet self-assigned this May 27, 2025
@qmonnet qmonnet added the area/nat Related to Network Address Translation (NAT) label May 27, 2025
@qmonnet qmonnet force-pushed the pr/qmonnet/nat-impl-peerings branch from ff99e0b to be6ff1a Compare June 3, 2025 11:50
@qmonnet qmonnet force-pushed the pr/qmonnet/hook-nat-config branch from 520189b to c8f212f Compare June 3, 2025 11:51
@qmonnet qmonnet force-pushed the pr/qmonnet/nat-impl-peerings branch from be6ff1a to 8a8ab31 Compare June 3, 2025 16:22
@qmonnet qmonnet force-pushed the pr/qmonnet/hook-nat-config branch from c8f212f to af212d0 Compare June 3, 2025 16:23
@qmonnet qmonnet force-pushed the pr/qmonnet/nat-impl-peerings branch from 8a8ab31 to 5a7b975 Compare June 3, 2025 16:53
@qmonnet qmonnet force-pushed the pr/qmonnet/hook-nat-config branch from af212d0 to 2a35cb9 Compare June 3, 2025 16:54
@qmonnet qmonnet force-pushed the pr/qmonnet/nat-impl-peerings branch 2 times, most recently from c16ccf0 to 9925bd2 Compare June 4, 2025 12:46
@qmonnet qmonnet force-pushed the pr/qmonnet/hook-nat-config branch from 2a35cb9 to 107ffcd Compare June 4, 2025 12:47
Copy link
Contributor

@mvachhar mvachhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going ot approve this since system level testing will test this code and we'll find any bugs. Later we should have some unit tests. Manual testing will suffice for this PR.

@qmonnet qmonnet marked this pull request as ready for review June 4, 2025 15:44
@qmonnet qmonnet requested a review from a team as a code owner June 4, 2025 15:44
Base automatically changed from pr/qmonnet/nat-impl-peerings to main June 4, 2025 15:45
qmonnet added 3 commits June 4, 2025 16:45
Inside of the NAT code, leverage the optimisation function to
(potentially) reduce the number of prefixes and exclusion prefixes
inside of the VpcExpose objects of a Peering before we process this
Peering to extend the NAT tables.

Now that we call the optimize_peering() function from add_peering(),
make it private: it's unlikely we'll need to call it from somewhere
else.

Signed-off-by: Quentin Monnet <[email protected]>
We'll need the Clone trait for NatTables in a future commit to add
NatTables as a member to a config object that needs to derive the trait.

Signed-off-by: Quentin Monnet <[email protected]>
Make sure we create the NAT tables when building the internal
configuration, and "store" them as part of the InternalConfig object.

Signed-off-by: Quentin Monnet <[email protected]>
@qmonnet qmonnet force-pushed the pr/qmonnet/hook-nat-config branch from 107ffcd to b52191c Compare June 4, 2025 15:45
@qmonnet qmonnet added this pull request to the merge queue Jun 6, 2025
Merged via the queue into main with commit ba955d9 Jun 6, 2025
17 checks passed
@qmonnet qmonnet deleted the pr/qmonnet/hook-nat-config branch June 6, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/nat Related to Network Address Translation (NAT)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NAT: Build NAT table rules
2 participants