This complies with OpenFlow 1.1 and later.

Found by OFTest.

Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 lib/ofp-util.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index 9996e84..28f6d8f 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -8592,6 +8592,10 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
     }
 
     LIST_FOR_EACH (bucket, list_node, &gm->buckets) {
+        if (bucket->weight && gm->type != OFPGT11_SELECT) {
+            return OFPERR_OFPGMFC_INVALID_GROUP;
+        }
+
         switch (gm->type) {
         case OFPGT11_ALL:
         case OFPGT11_INDIRECT:
-- 
2.1.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to