From: Hannes Frederic Sowa Date: Wed, 16 Dec 2015 09:52:36 +0000 (+0100) Subject: iproute: print addrgenmode stable_secret and fallback otherwise X-Git-Tag: v4.4.0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c5176ce4b014ddf12526ec08fc24f9eede18767;p=thirdparty%2Fiproute2.git iproute: print addrgenmode stable_secret and fallback otherwise Signed-off-by: Hannes Frederic Sowa --- diff --git a/ip/ipaddress.c b/ip/ipaddress.c index bc8359eb9..a495a391a 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -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; } } }