ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.hor...@netronome.com>

---
v3
* First Post
* Moved from handle_group_mod() as suggested by Ben Pfaff
  (previously part of a different patch)
---
 lib/ofp-util.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index 496dc40..f1431d5 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -7973,6 +7973,21 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
         OVS_NOT_REACHED();
     }
 
+    switch (gm->command) {
+    case OFPGC11_ADD:
+    case OFPGC11_MODIFY:
+    case OFPGC11_DELETE:
+    case OFPGC15_INSERT_BUCKET:
+        break;
+    case OFPGC15_REMOVE_BUCKET:
+        if (!list_is_empty(&gm->buckets)) {
+            return OFPERR_OFPGMFC_BAD_BUCKET;
+        }
+        break;
+    default:
+        OVS_NOT_REACHED();
+    }
+
     LIST_FOR_EACH (bucket, list_node, &gm->buckets) {
         switch (gm->type) {
         case OFPGT11_ALL:
-- 
2.1.1

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

Reply via email to