diff options
author | Ben Pfaff <blp@ovn.org> | 2016-09-14 16:58:44 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-09-14 20:34:49 -0700 |
commit | ebf8381b08b2baf3ca0eff12fd69ae604ee746d0 (patch) | |
tree | 8798a92cdcad8d97c989dfd050f99aa993783c6f | |
parent | 11547f85d64773fdb5f4009f076a3ad3cb446174 (diff) | |
download | openvswitch-ebf8381b08b2baf3ca0eff12fd69ae604ee746d0.tar.gz |
ovn-trace: Avoid segfault for DHCP options flows.
It would be better if ovn-trace fully supported DHCP options, but this at
least should avoid the segmentation fault.
Reported-by: Han Zhou <zhouhan@gmail.com>
Acked-by: Han Zhou <zhouhan@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r-- | ovn/lib/actions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ovn/lib/actions.c b/ovn/lib/actions.c index 03dba8f88..59131dde2 100644 --- a/ovn/lib/actions.c +++ b/ovn/lib/actions.c @@ -1321,7 +1321,7 @@ parse_dhcp_opt(struct action_context *ctx, struct ovnact_dhcp_option *o, const char *name = v6 ? "DHCPv6" : "DHCPv4"; const struct hmap *map = v6 ? ctx->pp->dhcpv6_opts : ctx->pp->dhcp_opts; - o->option = dhcp_opts_find(map, ctx->lexer->token.s); + o->option = map ? dhcp_opts_find(map, ctx->lexer->token.s) : NULL; if (!o->option) { lexer_syntax_error(ctx->lexer, "expecting %s option name", name); return; |