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:   Tue, 17 Jul 2018 20:09:02 -0600
From:   David Ahern <dsahern@...il.com>
To:     Qiaobin Fu <qiaobinf@...edu>
Cc:     stephen@...workplumber.org, davem@...emloft.net,
        netdev@...r.kernel.org, jhs@...atatu.com, michel@...irati.com.br,
        marcelo.leitner@...il.com, xiyou.wangcong@...il.com,
        dcaratti@...hat.com
Subject: Re: [PATCH iproute2-next v3] net:sched: add action inheritdsfield to
 skbedit

On 7/14/18 1:10 AM, Qiaobin Fu wrote:
> @@ -156,6 +162,9 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
>  	if (flags & SKBEDIT_F_PTYPE)
>  		addattr_l(n, MAX_MSG, TCA_SKBEDIT_PTYPE,
>  			  &ptype, sizeof(ptype));
> +	if (pure_flags != 0)
> +		addattr_l(n, MAX_MSG, TCA_SKBEDIT_FLAGS,
> +			  &pure_flags, sizeof(pure_flags));

I realize this follows suit with the current code, but tc needs to use
the helpers -- like addattr64 instead of addattr_l

>  	addattr_nest_end(n, tail);
>  
>  	*argc_p = argc;
> @@ -214,6 +223,13 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg)
>  		else
>  			print_uint(PRINT_ANY, "ptype", " ptype %u", ptype);
>  	}
> +	if (tb[TCA_SKBEDIT_FLAGS] != NULL) {
> +		__u64 *flags = RTA_DATA(tb[TCA_SKBEDIT_FLAGS]);

and rta_getattr_u64 instead of RTA_DATA.

> +
> +		if (*flags & SKBEDIT_F_INHERITDSFIELD)
> +			print_null(PRINT_ANY, "inheritdsfield", " %s",
> +				     "inheritdsfield");
> +	}
>  
>  	print_action_control(f, " ", p->action, "");
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ