[ovs-dev] [PATCH] ofp-util: Report error for weighted bucket in non-select group.
Ben Pfaff
blp at nicira.com
Tue Jul 28 22:21:14 UTC 2015
This complies with OpenFlow 1.1 and later.
Found by OFTest.
Signed-off-by: Ben Pfaff <blp at 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
More information about the dev
mailing list