summaryrefslogtreecommitdiff
path: root/ovn
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-11-02 09:23:06 -0700
committerBen Pfaff <blp@ovn.org>2018-11-05 07:37:01 -0800
commitfe62a88f5eaaaeb45baf08054415cd29c69f38e9 (patch)
tree8931c40b2255d6b17120241273d2f50ea22b2d66 /ovn
parent2d3deb58df05c4686f19ecf16ddbd76a79b2d5a5 (diff)
downloadopenvswitch-fe62a88f5eaaaeb45baf08054415cd29c69f38e9.tar.gz
ovn-northd: Always set nat_addresses and options in Port_Binding.
In some cases the code didn't set these columns. Found by inspection. Acked-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn')
-rw-r--r--ovn/northd/ovn-northd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 5c6c80e03..d5a3bc9a9 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -2170,6 +2170,8 @@ ovn_port_update_sbrec(struct northd_context *ctx,
struct smap ids = SMAP_INITIALIZER(&ids);
sbrec_port_binding_set_external_ids(op->sb, &ids);
+
+ sbrec_port_binding_set_nat_addresses(op->sb, NULL, 0);
} else {
if (strcmp(op->nbsp->type, "router")) {
uint32_t queue_id = smap_get_int(
@@ -2202,6 +2204,8 @@ ovn_port_update_sbrec(struct northd_context *ctx,
&rl, "Unknown port type '%s' set on logical switch '%s'.",
op->nbsp->type, op->nbsp->name);
}
+
+ sbrec_port_binding_set_nat_addresses(op->sb, NULL, 0);
} else {
const char *chassis = NULL;
if (op->peer && op->peer->od && op->peer->od->nbr) {
@@ -2229,6 +2233,8 @@ ovn_port_update_sbrec(struct northd_context *ctx,
}
sbrec_port_binding_set_options(op->sb, &new);
smap_destroy(&new);
+ } else {
+ sbrec_port_binding_set_options(op->sb, NULL);
}
const char *nat_addresses = smap_get(&op->nbsp->options,