Commit 5c5176ce authored by Hannes Frederic Sowa's avatar Hannes Frederic Sowa Committed by Stephen Hemminger

iproute: print addrgenmode stable_secret and fallback otherwise

Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
parent f0df4081
......@@ -285,13 +285,20 @@ static void print_af_spec(FILE *fp, struct rtattr *af_spec_attr)
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])) {
__u8 mode = rta_getattr_u8(tb[IFLA_INET6_ADDR_GEN_MODE]);
switch (mode) {
case IN6_ADDR_GEN_MODE_EUI64:
fprintf(fp, "addrgenmode eui64 ");
break;
case IN6_ADDR_GEN_MODE_NONE:
fprintf(fp, "addrgenmode none ");
break;
case IN6_ADDR_GEN_MODE_STABLE_PRIVACY:
fprintf(fp, "addrgenmode stable_secret ");
break;
default:
fprintf(fp, "addrgenmode %#.2hhx ", mode);
break;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment