[ovs-dev] [PATCH v2] lib/dpif: Fix crash in format_odp_actions, actions = 0x0
Ben Pfaff
blp at nicira.com
Sat Oct 18 18:55:27 UTC 2014
On Sat, Oct 18, 2014 at 11:02:58AM -0700, Madhu Challa wrote:
> Do not log_flow_get_message on error since the flow isn't available
I agree that there is a bug here but it's actually more important to log
the operation in the case of an error, for debugging purposes. I think
that, in case of an error, we should probably zero the stats and the
actions before calling log_flow_get_message().
Thanks,
Ben.
> ---
> lib/dpif.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/dpif.c b/lib/dpif.c
> index d088f68..f7aafa8 100644
> --- a/lib/dpif.c
> +++ b/lib/dpif.c
> @@ -1155,10 +1155,11 @@ dpif_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops)
> struct dpif_flow_get *get = &op->u.flow_get;
>
> COVERAGE_INC(dpif_flow_get);
> - log_flow_get_message(dpif, get, error);
>
> if (error) {
> memset(get->flow, 0, sizeof *get->flow);
> + } else {
> + log_flow_get_message(dpif, get, error);
> }
> break;
> }
> --
> 1.7.9.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list