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]
Message-ID: <20200129111259.GA3102@kwain>
Date:   Wed, 29 Jan 2020 12:12:59 +0100
From:   Antoine Tenart <antoine.tenart@...tlin.com>
To:     David Ahern <dsahern@...il.com>
Cc:     Antoine Tenart <antoine.tenart@...tlin.com>, sd@...asysnail.net,
        netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next 1/2] macsec: report the offloading mode
 currently selected

Hello David,

On Mon, Jan 27, 2020 at 09:41:21AM -0700, David Ahern wrote:
> On 1/20/20 1:18 PM, Antoine Tenart wrote:
> > @@ -997,6 +1002,19 @@ static int process(struct nlmsghdr *n, void *arg)
> >  	if (attrs[MACSEC_ATTR_RXSC_LIST])
> >  		print_rxsc_list(attrs[MACSEC_ATTR_RXSC_LIST]);
> >  
> > +	if (attrs[MACSEC_ATTR_OFFLOAD]) {
> > +		struct rtattr *attrs_offload[MACSEC_OFFLOAD_ATTR_MAX + 1];
> > +		__u8 offload;
> > +
> > +		parse_rtattr_nested(attrs_offload, MACSEC_OFFLOAD_ATTR_MAX,
> > +				    attrs[MACSEC_ATTR_OFFLOAD]);
> > +
> > +		offload = rta_getattr_u8(attrs_offload[MACSEC_OFFLOAD_ATTR_TYPE]);
> > +		print_string(PRINT_ANY, "offload",
> > +			     "    offload: %s ", offload_str[offload]);
> 
> you should be an accessor around offload_str[offload] to handle a future
> change adding a new type.

Good idea, I'll do that.

Thanks!
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ