* [PATCH iproute2] ipv6: allow setting stable_secret mode
@ 2015-12-16 11:30 Hannes Frederic Sowa
2015-12-16 16:56 ` Bjørn Mork
2015-12-16 18:56 ` Stephen Hemminger
0 siblings, 2 replies; 4+ messages in thread
From: Hannes Frederic Sowa @ 2015-12-16 11:30 UTC (permalink / raw)
To: netdev; +Cc: stephen
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
ip/iplink.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index f30de86d1858a0..e824082f7d8149 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;
}
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] ipv6: allow setting stable_secret mode
2015-12-16 11:30 [PATCH iproute2] ipv6: allow setting stable_secret mode Hannes Frederic Sowa
@ 2015-12-16 16:56 ` Bjørn Mork
2015-12-16 17:04 ` Hannes Frederic Sowa
2015-12-16 18:56 ` Stephen Hemminger
1 sibling, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2015-12-16 16:56 UTC (permalink / raw)
To: Hannes Frederic Sowa, netdev; +Cc: stephen
On December 16, 2015 12:30:08 PM CET, Hannes Frederic Sowa <hannes@stressinduktion.org> wrote:
>Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
>---
> ip/iplink.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/ip/iplink.c b/ip/iplink.c
>index f30de86d1858a0..e824082f7d8149 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;
> }
>
Ah, didn't notice this before I sent my similar patch. Sorry about that.
But FWIW, I really don't like the renaming you do here.
If the mode is 'stable_privacy', then it should be known
by that name here as well.
Bjørn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] ipv6: allow setting stable_secret mode
2015-12-16 16:56 ` Bjørn Mork
@ 2015-12-16 17:04 ` Hannes Frederic Sowa
0 siblings, 0 replies; 4+ messages in thread
From: Hannes Frederic Sowa @ 2015-12-16 17:04 UTC (permalink / raw)
To: Bjørn Mork, netdev; +Cc: stephen
On 16.12.2015 17:56, Bjørn Mork wrote:
>
>
> On December 16, 2015 12:30:08 PM CET, Hannes Frederic Sowa <hannes@stressinduktion.org> wrote:
>> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
>> ---
>> ip/iplink.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/ip/iplink.c b/ip/iplink.c
>> index f30de86d1858a0..e824082f7d8149 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;
>> }
>>
>
> Ah, didn't notice this before I sent my similar patch. Sorry about that.
>
> But FWIW, I really don't like the renaming you do here.
> If the mode is 'stable_privacy', then it should be known
> by that name here as well.
I am fine with both ways. We can take your patch as you also updated the
man page. :)
The reason why I chose stable secret in the end was to align it with the
already visible proc filename stable_secret and didn't care too much
about the internal variable names.
Thanks,
Hannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] ipv6: allow setting stable_secret mode
2015-12-16 11:30 [PATCH iproute2] ipv6: allow setting stable_secret mode Hannes Frederic Sowa
2015-12-16 16:56 ` Bjørn Mork
@ 2015-12-16 18:56 ` Stephen Hemminger
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2015-12-16 18:56 UTC (permalink / raw)
To: Hannes Frederic Sowa; +Cc: netdev
On Wed, 16 Dec 2015 12:30:08 +0100
Hannes Frederic Sowa <hannes@stressinduktion.org> wrote:
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> ---
> ip/iplink.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ip/iplink.c b/ip/iplink.c
> index f30de86d1858a0..e824082f7d8149 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;
> }
>
ip options are supposed to be clse to invertable. ie what is displayed on show
command should match what are options for set. There were even some VPN scripts
that depended on this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-16 18:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 11:30 [PATCH iproute2] ipv6: allow setting stable_secret mode Hannes Frederic Sowa
2015-12-16 16:56 ` Bjørn Mork
2015-12-16 17:04 ` Hannes Frederic Sowa
2015-12-16 18:56 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).