ofp-util: Check out_group on flow_mod only for "delete" commands.
authorJarno Rajahalme <jarno.rajahalme@nsn.com>
Mon, 26 Nov 2012 17:44:38 +0000 (09:44 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 27 Nov 2012 16:29:01 +0000 (08:29 -0800)
This conforms with OpenFlow 1.1+ wording.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-util.c

index b7feff800197c5377895d1593d1987b4845de965..bab6b2ce24a0a001b674d0f236c2516e050407d1 100644 (file)
@@ -1435,7 +1435,9 @@ ofputil_decode_flow_mod(struct ofputil_flow_mod *fm,
         if (error) {
             return error;
         }
-        if (ofm->out_group != htonl(OFPG_ANY)) {
+        if ((ofm->command == OFPFC_DELETE
+             || ofm->command == OFPFC_DELETE_STRICT)
+            && ofm->out_group != htonl(OFPG_ANY)) {
             return OFPERR_OFPFMFC_UNKNOWN;
         }
         fm->flags = ntohs(ofm->flags);