[ovs-dev] [PATCH] Fixes: 3f5b5f7b4115 ("db-ctl-base: Always support all tables in schema.")

ZhiPeng Lu lu.zhipeng at zte.com.cn
Tue Jul 11 00:47:10 UTC 2017


This fixes an assertion failure in command "ovs-vsctl list netflow br0",
if bridge br0 without any netflows.
$ovs-vsctl list netflow br0
ovs-vsctl: lib/ovsdb-idl.c:2407: assertion column_idx < class->n_columns failed 
in ovsdb_idl_read()
Aborted

Get_row_by_id() shoudle return NULL if not find by ovsdb_idl_get_row_for_uuid().

Signed-off-by: Zhipeng Lu <lu.zhipeng at zte.com.cn>
---
 lib/db-ctl-base.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c
index 7839389..90629d5 100644
--- a/lib/db-ctl-base.c
+++ b/lib/db-ctl-base.c
@@ -346,6 +346,8 @@ get_row_by_id(struct ctl_context *ctx,
         if (uuid->n == 1) {
             final = ovsdb_idl_get_row_for_uuid(ctx->idl, table,
                                                &uuid->keys[0].uuid);
+        } else {
+            final = NULL;
         }
     }
     return final;
-- 
1.8.3.1




More information about the dev mailing list