[ovs-dev] [PATCH 1/2] ofp-actions: Avoid logging 64 times as many actions as actually provided.
Jarno Rajahalme
jrajahalme at nicira.com
Mon Aug 11 21:10:46 UTC 2014
Exponential bug :-)
I find the identifier ‘max_actions’ still misleading, ‘actions_len’ would be better.
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>
On Aug 11, 2014, at 1:44 PM, Ben Pfaff <blp at nicira.com> wrote:
> The following commit adds a test.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> lib/ofp-actions.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
> index bcadb55..8f3af19 100644
> --- a/lib/ofp-actions.c
> +++ b/lib/ofp-actions.c
> @@ -4167,7 +4167,7 @@ log_bad_action(const struct ofp_action_header *actions, size_t max_actions,
> struct ds s;
>
> ds_init(&s);
> - ds_put_hex_dump(&s, actions, max_actions * OFP_ACTION_ALIGN, 0, false);
> + ds_put_hex_dump(&s, actions, max_actions, 0, false);
> VLOG_WARN("bad action at offset %#"PRIxPTR" (%s):\n%s",
> (char *)bad_action - (char *)actions,
> ofperr_get_name(error), ds_cstr(&s));
> @@ -4194,7 +4194,7 @@ ofpacts_decode(const void *actions, size_t actions_len,
> }
>
> if (error) {
> - log_bad_action(actions, actions_len * 8, action, error);
> + log_bad_action(actions, actions_len, action, error);
> return error;
> }
> }
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list