[ovs-dev] [PATCH ovn 12/14] ovn-nbctl: Fix IP leak on router NAT addition failure.
Ilya Maximets
i.maximets at ovn.org
Fri Nov 20 00:17:22 UTC 2020
Cleanup needed instead of direct return.
Fixes: 43f42ecb3a5a ("Use normalized IP addreses in `ovn-nbctl lr-nat-add`")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
---
utilities/ovn-nbctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index 89537edf0..526dbf86c 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -4311,7 +4311,7 @@ nbctl_lr_nat_add(struct ctl_context *ctx)
if (strcmp(nat_type, "dnat_and_snat") && stateless) {
ctl_error(ctx, "stateless is not applicable to dnat or snat types");
- return;
+ goto cleanup;
}
int is_snat = !strcmp("snat", nat_type);
--
2.25.4
More information about the dev
mailing list