mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
ovsdb-idl.c: Fix IDL index problem when rows are updated.
In current IDL index code it doesn't updated index when handling "update2" messages, which is the default case. The consequence is that when a row is updated, the index is not updated accordingly, and even worse, it causes crash when calling ovsdb_idl_destroy(). It can be easily reproduced by the test cases added in this patch. Signed-off-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -3040,11 +3040,13 @@ ovsdb_idl_modify_row_by_diff(struct ovsdb_idl_row *row,
|
||||
{
|
||||
bool changed;
|
||||
|
||||
ovsdb_idl_remove_from_indexes(row);
|
||||
ovsdb_idl_row_unparse(row);
|
||||
ovsdb_idl_row_clear_arcs(row, true);
|
||||
changed = ovsdb_idl_row_apply_diff(row, diff_json,
|
||||
OVSDB_IDL_CHANGE_MODIFY);
|
||||
ovsdb_idl_row_parse(row);
|
||||
ovsdb_idl_add_to_indexes(row);
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user