2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ofp-util: Ignore out_group in flow_mods for commands other than delete.

OpenFlow 1.1 through 1.4 say that the out_group in a flow_mod, for commands
other than OFPFC_DELETE or OFPFC_DELETE_STRICT, should be ignored.  OVS
actually reported an error.  This fixes the problem.

Reported-by: chen zhang <3zhangchen9211@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2013-12-05 21:29:14 -08:00
parent 4ca828d713
commit 1fe4c0a0ca
2 changed files with 5 additions and 6 deletions

View File

@@ -1559,13 +1559,11 @@ ofputil_decode_flow_mod(struct ofputil_flow_mod *fm,
if (error) {
return error;
}
fm->out_group = ntohl(ofm->out_group);
if ((ofm->command == OFPFC_DELETE
|| ofm->command == OFPFC_DELETE_STRICT)
&& ofm->out_group != htonl(OFPG_ANY)) {
return OFPERR_OFPFMFC_UNKNOWN;
}
fm->out_group = (ofm->command == OFPFC_DELETE ||
ofm->command == OFPFC_DELETE_STRICT
? ntohl(ofm->out_group)
: OFPG11_ANY);
raw_flags = ofm->flags;
} else {
uint16_t command;