Signed-off-by: Hannes Frederic Sowa <han...@stressinduktion.org>
---
 ip/ipaddress.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index bc8359eb9fad6c..a495a391a0ecdb 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;
                }
        }
 }
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to