lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 19 Jul 2020 10:07:56 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Jamie Gloudon <jamie.gloudon@....fr>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] tc/m_estimator: Print proper value for
 estimator interval in raw.

On Fri, 17 Jul 2020 11:05:30 -0400
Jamie Gloudon <jamie.gloudon@....fr> wrote:

> While looking at the estimator code, I noticed an incorrect interval
> number printed in raw for the handles. This patch fixes the formatting.
> 
> Before patch:
> 
> root@...ecenter.fr:~# tc -r filter add dev eth0 ingress estimator
> 250ms 999ms matchall action police avrate 12mbit conform-exceed drop
> [estimator i=4294967294 e=2]
> 
> After patch:
> 
> root@...ecenter.fr:~# tc -r filter add dev eth0 ingress estimator
> 250ms 999ms matchall action police avrate 12mbit conform-exceed drop
> [estimator i=-2 e=2]
> 
> Signed-off-by: Jamie Gloudon <jamie.gloudon@....fr>
> ---
>  tc/m_estimator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tc/m_estimator.c b/tc/m_estimator.c
> index ef62e1bb..b5f4c860 100644
> --- a/tc/m_estimator.c
> +++ b/tc/m_estimator.c
> @@ -57,7 +57,7 @@ int parse_estimator(int *p_argc, char ***p_argv, struct tc_estimator *est)
>  		return -1;
>  	}
>  	if (show_raw)
> -		fprintf(stderr, "[estimator i=%u e=%u]\n", est->interval, est->ewma_log);
> +		fprintf(stderr, "[estimator i=%hhd e=%u]\n", est->interval, est->ewma_log);
>  	*p_argc = argc;
>  	*p_argv = argv;
>  	return 0;
> --
> 2.17.5
> 

Looks ok to me. Could you update estimator to print JSON as well?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ