From 5c5176ce4b014ddf12526ec08fc24f9eede18767 Mon Sep 17 00:00:00 2001 From: Hannes Frederic Sowa Date: Wed, 16 Dec 2015 10:52:36 +0100 Subject: iproute: print addrgenmode stable_secret and fallback otherwise Signed-off-by: Hannes Frederic Sowa --- ip/ipaddress.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index bc8359e..a495a39 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; } } } -- cgit v1.2.3