On 1/9/24 23:49, Ilya Maximets wrote: > It is currently not possible for the role to change in runtime > (unless a manual DB transaction is crafted), but it will be with > addition of a config file. > > If the role changes, listening socket will be closed, and all > the connections to this remote will be terminated. > > Signed-off-by: Ilya Maximets <[email protected]> > --- > ovsdb/jsonrpc-server.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c > index 81e9e48a0..f3b4961f3 100644 > --- a/ovsdb/jsonrpc-server.c > +++ b/ovsdb/jsonrpc-server.c > @@ -330,7 +330,8 @@ ovsdb_jsonrpc_server_set_remotes(struct > ovsdb_jsonrpc_server *svr, > if (!options) { > VLOG_INFO("%s: remote deconfigured", node->name); > ovsdb_jsonrpc_server_del_remote(node); > - } else if (options->dscp != remote->dscp) { > + } else if (options->dscp != remote->dscp > + || !nullable_string_is_equal(options->role, > remote->role)) {
I don't think it makes a huge difference but to make it indent a bit better I would've added another "else if ()". Up to you though: Acked-by: Dumitru Ceara <[email protected]> > ovsdb_jsonrpc_server_del_remote(node); > } > } _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
