netdev: Fix build for switchui.
[sliver-openvswitch.git] / ovsdb / ovsdb.c
index 4d5f1c5..27254e6 100644 (file)
@@ -107,6 +107,8 @@ ovsdb_schema_from_json(struct json *json, struct ovsdb_schema **schemap)
         if (node->name[0] == '_') {
             error = ovsdb_syntax_error(json, NULL, "names beginning with "
                                        "\"_\" are reserved");
+        } else if (!ovsdb_parser_is_id(node->name)) {
+            error = ovsdb_syntax_error(json, NULL, "name must be a valid id");
         } else {
             error = ovsdb_table_schema_from_json(node->data, node->name,
                                                  &table);