[ovs-dev] [PATCH] ofp-util: Reject bad group type and command with error instead of abort.

Ben Pfaff blp at nicira.com
Mon Oct 12 17:10:27 UTC 2015


Signed-off-by: Ben Pfaff <blp at nicira.com>
Reported-by: Manpreet Singh <er.manpreet25 at gmail.com>
Reported-at: http://openvswitch.org/pipermail/discuss/2015-October/019048.html
---
 AUTHORS        | 1 +
 lib/ofp-util.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 99bcf60..8123f43 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -310,6 +310,7 @@ Len Gao                 leng at vmware.com
 Logan Rosen             logatronico at gmail.com
 Luca Falavigna          dktrkranz at debian.org
 Luiz Henrique Ozaki     luiz.ozaki at gmail.com
+Manpreet Singh          er.manpreet25 at gmail.com
 Marco d'Itri            md at Linux.IT
 Martin Vizvary          vizvary at ics.muni.cz
 Marvin Pascual          marvin at pascual.com.ph
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index b9dbcda..f0f6319 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -8679,7 +8679,7 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
     case OFPGT11_FF:
         break;
     default:
-        OVS_NOT_REACHED();
+        return OFPERR_OFPGMFC_BAD_TYPE;
     }
 
     switch (gm->command) {
@@ -8694,7 +8694,7 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
         }
         break;
     default:
-        OVS_NOT_REACHED();
+        return OFPERR_OFPGMFC_BAD_COMMAND;
     }
 
     LIST_FOR_EACH (bucket, list_node, &gm->buckets) {
-- 
2.1.3




More information about the dev mailing list