diff options
author | Bjørn Mork <bjorn@mork.no> | 2016-01-04 10:58:04 +0100 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2016-01-06 09:20:59 -0800 |
commit | 8e098dd81a1d915c641a094a0bc2bf1c52a8e14e (patch) | |
tree | 8286d10f11934149e9b8a8df8632672a0f14ee08 | |
parent | a4c89d808734fe980813587cc1b7899835376a62 (diff) | |
download | android_external_iproute2-8e098dd81a1d915c641a094a0bc2bf1c52a8e14e.tar.gz android_external_iproute2-8e098dd81a1d915c641a094a0bc2bf1c52a8e14e.tar.bz2 android_external_iproute2-8e098dd81a1d915c641a094a0bc2bf1c52a8e14e.zip |
iplink: support setting addrgenmode stable_secret
It is possible to switch to another addrgenmode after setting a
valid secret. Allow switching back without reconfiguring the
secret for completeness.
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rw-r--r-- | ip/iplink.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ip/iplink.c b/ip/iplink.c index f30de86..e824082 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -84,7 +84,7 @@ void iplink_usage(void) fprintf(stderr, " [ state { auto | enable | disable} ] ]\n"); fprintf(stderr, " [ master DEVICE ]\n"); fprintf(stderr, " [ nomaster ]\n"); - fprintf(stderr, " [ addrgenmode { eui64 | none } ]\n"); + fprintf(stderr, " [ addrgenmode { eui64 | none | stable_secret } ]\n"); fprintf(stderr, " [ protodown { on | off } ]\n"); fprintf(stderr, " ip link show [ DEVICE | group GROUP ] [up] [master DEV] [type TYPE]\n"); @@ -176,6 +176,8 @@ static int get_addr_gen_mode(const char *mode) return IN6_ADDR_GEN_MODE_EUI64; if (strcasecmp(mode, "none") == 0) return IN6_ADDR_GEN_MODE_NONE; + if (strcasecmp(mode, "stable_secret") == 0) + return IN6_ADDR_GEN_MODE_STABLE_PRIVACY; return -1; } |