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]
Message-ID: <69ba6f7f-9f52-a7fb-7608-955cdb200dd1@gmail.com>
Date:   Mon, 27 Jan 2020 09:41:21 -0700
From:   David Ahern <dsahern@...il.com>
To:     Antoine Tenart <antoine.tenart@...tlin.com>, dsahern@...il.com,
        sd@...asysnail.net
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next 1/2] macsec: report the offloading mode
 currently selected

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ