summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-05-10 15:55:07 -0700
committerBen Pfaff <blp@ovn.org>2018-05-17 08:09:21 -0700
commit720c104c93ecb3954890a4b25bf03af668026f63 (patch)
tree080e026f64e0bbb37cb46945ccf6fde76560ae26 /lib
parenta04e58881e25f6b687f5635abc695724c5153782 (diff)
downloadopenvswitch-720c104c93ecb3954890a4b25bf03af668026f63.tar.gz
ofp-group: Require watch_port or watch_group when parsing ff groups.
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@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ofp-group.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ofp-group.c b/lib/ofp-group.c
index 31b043794..5b54faee9 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);