mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
ofproto: Only allow indirect groups with one bucket
OpenFlow 1.1 - 1.4 specify that indirect groups should opperate on the "one defined bucket in the group". OpenFlow 1.2 - 1.4 also state "This group only supports a single bucket." This patch enforces the single bucket limitation for indirect groups when decoding group mod messages. A test is also added to exercise this change. Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -7420,6 +7420,20 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
|
||||
return err;
|
||||
}
|
||||
|
||||
switch (gm->type) {
|
||||
case OFPGT11_INDIRECT:
|
||||
if (!list_is_singleton(&gm->buckets)) {
|
||||
return OFPERR_OFPGMFC_INVALID_GROUP;
|
||||
}
|
||||
break;
|
||||
case OFPGT11_ALL:
|
||||
case OFPGT11_SELECT:
|
||||
case OFPGT11_FF:
|
||||
break;
|
||||
default:
|
||||
OVS_NOT_REACHED();
|
||||
}
|
||||
|
||||
LIST_FOR_EACH (bucket, list_node, &gm->buckets) {
|
||||
switch (gm->type) {
|
||||
case OFPGT11_ALL:
|
||||
|
Reference in New Issue
Block a user