summaryrefslogtreecommitdiff
path: root/ofproto/ofproto.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-09-25 14:06:37 -0700
committerBen Pfaff <blp@ovn.org>2018-09-26 13:49:43 -0700
commitf836888d28ec89565f87609e06f48becb49e5079 (patch)
tree67cbab4a8ca8b1b47bf5788ee2a8a684434da28a /ofproto/ofproto.c
parentffe6cea89667a7e6d4ac0396f85acdcb3c64ce0e (diff)
downloadopenvswitch-f836888d28ec89565f87609e06f48becb49e5079.tar.gz
ofproto: Handle OpenFlow version mismatch for requestforward with groups.
OpenFlow 1.4+ supports a feature called requestforward. When a controller enables this feature, the switch sends that controller a copy of other controllers' group and meter modification requests. OpenFlow 1.5 supports some group features not in OpenFlow 1.4. When OVS attempted to forward such requests to an OpenFlow 1.4 controller, it reported an error and exited. This commit fixes the problem by making OVS properly translate the messages to OpenFlow 1.4 format. Reported-by: Pierre Cregut <pierre.cregut@orange.com> Tested-by: Pierre Cregut <pierre.cregut@orange.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-September/047453.html Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto.c')
-rw-r--r--ofproto/ofproto.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 9552a585d..a8cc4751f 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -7393,10 +7393,13 @@ ofproto_group_mod_finish(struct ofproto *ofproto,
remove_groups_postponed(&ogm->old_groups);
if (req) {
- struct ofputil_requestforward rf;
- rf.xid = req->request->xid;
- rf.reason = OFPRFR_GROUP_MOD;
- rf.group_mod = &ogm->gm;
+ struct ofputil_requestforward rf = {
+ .xid = req->request->xid,
+ .reason = OFPRFR_GROUP_MOD,
+ .group_mod = &ogm->gm,
+ .new_buckets = new_group ? &new_group->buckets : NULL,
+ .group_existed = group_collection_n(&ogm->old_groups) > 0,
+ };
connmgr_send_requestforward(ofproto->connmgr, req->ofconn, &rf);
}
}