Skip to content

Commit

Permalink
Merge pull request #3714 from trozet/fix_nat_delete_panic
Browse files Browse the repository at this point in the history
Fixes panic with delete NAT operations
  • Loading branch information
trozet committed Jun 28, 2023
2 parents c2baa73 + 1541b58 commit 8bd07ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion go-controller/pkg/libovsdbops/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,10 @@ func GetRouterNATs(nbClient libovsdbclient.Client, router *nbdb.LogicalRouter) (
nats := []*nbdb.NAT{}
for _, uuid := range r.Nat {
nat, err := GetNAT(nbClient, &nbdb.NAT{UUID: uuid})
if err != nil && err != libovsdbclient.ErrNotFound {
if err == libovsdbclient.ErrNotFound {
continue
}
if err != nil {
return nil, fmt.Errorf("failed to lookup NAT entry with uuid: %s, error: %w", uuid, err)
}
nats = append(nats, nat)
Expand Down

0 comments on commit 8bd07ff

Please sign in to comment.