[ovs-dev] [PATCH 2/2] ofp-util: Check out_group on flow_mod only for "delete" commands.

Ben Pfaff blp at nicira.com
Mon Nov 26 18:11:02 UTC 2012


From: Jarno Rajahalme <jarno.rajahalme at nsn.com>

This conforms with OpenFlow 1.1+ wording.
---
 lib/ofp-util.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index b7feff8..bab6b2c 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -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);
-- 
1.7.2.5




More information about the dev mailing list