> On Dec 8, 2017, at 1:01 PM, Ben Pfaff <[email protected]> wrote: > > This oversight allowed monitor IDs to be duplicated when the > monitor_cond_change request changed them. > > Signed-off-by: Ben Pfaff <[email protected]> > --- > ovsdb/jsonrpc-server.c | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) > > diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c > index da3b3835f0d7..36e50241b040 100644 > --- a/ovsdb/jsonrpc-server.c > +++ b/ovsdb/jsonrpc-server.c > @@ -1420,6 +1420,14 @@ ovsdb_jsonrpc_monitor_cond_change(struct > ovsdb_jsonrpc_session *s, > goto error; > } > > + struct ovsdb_jsonrpc_monitor *m2 > + = ovsdb_jsonrpc_monitor_find(s, params->u.array.elems[1]); > + if (m2 && m2 != m) { > + error = ovsdb_syntax_error(params->u.array.elems[1], NULL, > + "duplicate monitor ID"); > + goto error; > + }
As we discussed off-line, I found the logic a bit confusing. It might be clearer with either a comment or a slight restructuring of the code. Acked-by: Justin Pettit <[email protected]> --Justin _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
