[ovs-dev] [PATCH 3/7] ofp-group: Require watch_port or watch_group when parsing ff groups.

Ben Pfaff blp at ovn.org
Thu May 10 23:24:35 UTC 2018


Fast failover buckets must have a watch_port or a watch_group (or both),
and ovs-vswitchd enforces this, but the bucket parsing code didn't check
it.  This meant that when it was omitted, the error messages were harder
to understand.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 lib/ofp-group.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/ofp-group.c b/lib/ofp-group.c
index 31b04379448c..5b54faee963f 100644
--- a/lib/ofp-group.c
+++ b/lib/ofp-group.c
@@ -611,6 +611,10 @@ parse_bucket_str(struct ofputil_bucket *bucket, char *str_,
     if (!actions.length) {
         return xstrdup("bucket must specify actions");
     }
+    if (group_type == OFPGT11_FF && !ofputil_bucket_has_liveness(bucket)) {
+        return xstrdup("fast failover bucket requires watch_port or "
+                       "watch_group");
+    }
     ds_chomp(&actions, ',');
 
     ofpbuf_init(&ofpacts, 0);
-- 
2.16.1



More information about the dev mailing list