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: <1420563153.2527.14.camel@hal>
Date:	Tue, 06 Jan 2015 17:52:33 +0100
From:	Thomas Haller <thaller@...hat.com>
To:	Jiri Pirko <jiri@...nulli.us>
Cc:	netdev@...r.kernel.org, stephen@...workplumber.org
Subject: Re: [patch iproute2 2/2] iplink: print out addrgenmode attribute

On Tue, 2015-01-06 at 17:23 +0100, Jiri Pirko wrote:
> addrgenmode is currently write only by ip. So display this information
> if provided by kernel as well.

>  
> +static void print_af_spec(FILE *fp, struct rtattr *af_spec_attr)
> +{
> +	struct rtattr *inet6_attr;
> +	struct rtattr *tb[IFLA_INET6_MAX + 1];
> +
> +	inet6_attr = parse_rtattr_one_nested(AF_INET6, af_spec_attr);
> +	if (!inet6_attr)
> +		return;
> +
> +	parse_rtattr_nested(tb, IFLA_INET6_MAX, inet6_attr);
> +
> +	if (tb[IFLA_INET6_ADDR_GEN_MODE]) {
> +		switch (rta_getattr_u8(tb[IFLA_INET6_ADDR_GEN_MODE])) {
> +		case IN6_ADDR_GEN_MODE_EUI64:
> +			fprintf(fp, "addrgenmode eui64 ");

eui64 is the default and the behavior of older kernels.

I dunno, would it be better not to print the default case?


Thomas

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ