Skip to content

Commit

Permalink
ovn-trace: Make sure we don't exit when the port is not specified.
Browse files Browse the repository at this point in the history
It might happen that the microflow doesn't have port specified or
the port is part of different datapath. In that case ovn-trace would
print warning and move to later crash on assert. Exit early instead
of crashing on assert.

Signed-off-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
almusil authored and dceara committed Apr 12, 2024
1 parent 0d4e087 commit 73bbf6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities/ovn-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ trace(const char *dp_s, const char *flow_s)
}
uint32_t in_key = uflow.regs[MFF_LOG_INPORT - MFF_REG0];
if (!in_key) {
VLOG_WARN("microflow does not specify ingress port");
return xstrdup("microflow does not specify ingress port");
}
const struct ovntrace_port *inport = ovntrace_port_find_by_key(dp, in_key);
const char *inport_name = inport ? inport->friendly_name : "(unnamed)";
Expand Down

0 comments on commit 73bbf6b

Please sign in to comment.