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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 22 Mar 2020 15:43:18 -0600
From:   David Ahern <dsahern@...il.com>
To:     Petr Machata <petrm@...lanox.com>, netdev@...r.kernel.org
Cc:     David Ahern <dsahern@...il.com>
Subject: Re: [PATCH iproute2-next 2/2] tc: q_red: Support 'nodrop' flag

On 3/18/20 6:18 AM, Petr Machata wrote:
> @@ -154,6 +161,7 @@ static int red_parse_opt(struct qdisc_util *qu, int argc, char **argv,
>  	addattr_l(n, 1024, TCA_RED_STAB, sbuf, 256);
>  	max_P = probability * pow(2, 32);
>  	addattr_l(n, 1024, TCA_RED_MAX_P, &max_P, sizeof(max_P));
> +	addattr_l(n, 1024, TCA_RED_FLAGS, &flags_bf, sizeof(flags_bf));

the attr is a bitfield32 here ...

>  	addattr_nest_end(n, tail);
>  	return 0;
>  }
> @@ -183,6 +191,10 @@ static int red_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
>  	    RTA_PAYLOAD(tb[TCA_RED_MAX_P]) >= sizeof(__u32))
>  		max_P = rta_getattr_u32(tb[TCA_RED_MAX_P]);
>  
> +	if (tb[TCA_RED_FLAGS] &&
> +	    RTA_PAYLOAD(tb[TCA_RED_FLAGS]) >= sizeof(__u32))
> +		qopt->flags = rta_getattr_u32(tb[TCA_RED_FLAGS]);
> +

but a u32 here. These should be consistent.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ