[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150106170836.GA1921@nanopsycho.orion>
Date: Tue, 6 Jan 2015 18:08:36 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Thomas Haller <thaller@...hat.com>
Cc: netdev@...r.kernel.org, stephen@...workplumber.org
Subject: Re: [patch iproute2 2/2] iplink: print out addrgenmode attribute
Tue, Jan 06, 2015 at 05:52:33PM CET, thaller@...hat.com wrote:
>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?
This prints only when show_details is on. So I believe it is ok to print
the default value of addrgenmode (same is done as for other things)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists