Message ID | CA+0q_PjcAcc7J=3P-cZ-Q0Y++yAvTjEiycU7HVAJ+rVFvbesRg@mail.gmail.com |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index a063a05..4466f22 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -1816,13 +1816,11 @@ ovn_port_update_sbrec(const struct ovn_port *op, struct smap ids = SMAP_INITIALIZER(&ids); smap_clone(&ids, &op->nbsp->external_ids); const char *name = smap_get(&ids, "neutron:port_name"); - if (name) { - smap_remove(&ids, "neutron:port_name"); - if (name[0]) { - smap_add(&ids, "name", name); - } + if (name && name[0]) { + smap_add(&ids, "name", name); } sbrec_port_binding_set_external_ids(op->sb, &ids); + smap_destroy(&ids); } }