summaryrefslogtreecommitdiff
path: root/lib/odp-util.c
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2020-12-18 14:34:55 +0100
committerIlya Maximets <i.maximets@ovn.org>2021-01-21 13:56:22 +0100
commite7eb904d2bd45201efdc0caf58d8930628357f15 (patch)
tree00ace1b145c754147971c126d12b3244fcf6ea2e /lib/odp-util.c
parent50e5523b9b2b154e5fafc5acdcdec85e9cc5a330 (diff)
downloadopenvswitch-e7eb904d2bd45201efdc0caf58d8930628357f15.tar.gz
odp-util: Fix abort while formatting nsh actions.
OVS should not exit if it cannot format NSH actions for the user. It should just report the error like the other formatting functions do. Credit to OSS-Fuzz. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21509 Fixes: 1fc11c5948cf ("Generic encap and decap support for NSH") Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Acked-by: Mark Gray <mark.d.gray@redhat.com>
Diffstat (limited to 'lib/odp-util.c')
-rw-r--r--lib/odp-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/odp-util.c b/lib/odp-util.c
index d65ebb541..a8598d52a 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -391,7 +391,8 @@ format_odp_push_nsh_action(struct ds *ds,
break;
}
default:
- OVS_NOT_REACHED();
+ ds_put_cstr(ds, ",<error: unknown mdtype>");
+ break;
}
ds_put_format(ds, ")");
}