aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2015-12-16 10:52:36 +0100
committerStephen Hemminger <shemming@brocade.com>2015-12-17 17:25:04 -0800
commit5c5176ce4b014ddf12526ec08fc24f9eede18767 (patch)
tree0416e9a2fbef0b06bfa1cacb04bc8101ee6b9fd9
parentf0df40810f1c0bc86cf1fcb6f660b0fd9912b1d3 (diff)
downloadandroid_external_iproute2-5c5176ce4b014ddf12526ec08fc24f9eede18767.tar.gz
android_external_iproute2-5c5176ce4b014ddf12526ec08fc24f9eede18767.tar.bz2
android_external_iproute2-5c5176ce4b014ddf12526ec08fc24f9eede18767.zip
iproute: print addrgenmode stable_secret and fallback otherwise
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
-rw-r--r--ip/ipaddress.c9
1 files changed, 8 insertions, 1 deletions
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;
}
}
}