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 <[email protected]>
---
 lib/ofp-actions.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index a80a4a308dba..f25fdec64cc0 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -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
-- 
2.7.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to