X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fovsdb-types.c;h=659b50db3c0b040ed2aa08367adff0bcdc99f316;hb=987ae961590b56f1526a17d3bb15c38fd5e9caf9;hp=07982e343e6b3f14ad5afe4bdca10d8b89f428c3;hpb=f85f8ebbfac946c19b3c6eb0f4170f579d0a4d25;p=openvswitch diff --git a/lib/ovsdb-types.c b/lib/ovsdb-types.c index 07982e34..659b50db 100644 --- a/lib/ovsdb-types.c +++ b/lib/ovsdb-types.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009 Nicira Networks +/* Copyright (c) 2009, 2010 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,6 +75,7 @@ ovsdb_type_is_valid(const struct ovsdb_type *type) return (type->key_type != OVSDB_TYPE_VOID && ovsdb_atomic_type_is_valid(type->key_type) && ovsdb_atomic_type_is_valid(type->value_type) + && type->n_min <= 1 && type->n_min <= type->n_max && (type->value_type == OVSDB_TYPE_VOID || ovsdb_atomic_type_is_valid_key(type->key_type)));