Skip to content

Commit

Permalink
Ensure ipv4 nat entry is active
Browse files Browse the repository at this point in the history
ensure_ipv4_nat_entry previously would match against *any* existing
table entries with the matching parameters. We need it to only
match against entries that are *active*, or in implementation terms,
entries whose version_removed column is NULL.
  • Loading branch information
internet-diglett committed Dec 5, 2023
1 parent 9b666e7 commit a2d0814
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nexus/db-queries/src/db/datastore/ipv4_nat_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ impl DataStore {
.filter(dsl::sled_address.eq(nat_entry.sled_address))
.filter(dsl::vni.eq(nat_entry.vni))
.filter(dsl::mac.eq(nat_entry.mac))
.filter(dsl::version_removed.is_null())
.select((
dsl::external_address,
dsl::first_port,
Expand Down

0 comments on commit a2d0814

Please sign in to comment.