]> git.proxmox.com Git - ovs.git/commitdiff
ofp-actions: Let parse_UNROLL_XLATE return error message instead of aborting program
authorYifeng Sun <pkusunyifeng@gmail.com>
Thu, 1 Nov 2018 22:05:31 +0000 (15:05 -0700)
committerBen Pfaff <blp@ovn.org>
Fri, 2 Nov 2018 20:00:39 +0000 (13:00 -0700)
Currently, if unroll_xlate is passed to ovs-ofctl as one of actions,
let say 'ovs-ofctl add-flow br0 in_port=1,actions=unroll_xlate',
ovs-ofctl will crash. This patch fixes it by returning an error
message.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11184
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/ofp-actions.c

index a80a4a308dba720de543abb30562c442c85b2f64..f25fdec64cc0e0c9a7cb4705672f116497515e78 100644 (file)
@@ -5842,7 +5842,8 @@ static char * OVS_WARN_UNUSED_RESULT
 parse_UNROLL_XLATE(char *arg OVS_UNUSED,
                    const struct ofpact_parse_params *pp OVS_UNUSED)
 {
-    OVS_NOT_REACHED();
+    return xasprintf("UNROLL is an internal action "
+                     "that shouldn't be used via OpenFlow");
 }
 
 static void