[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAedzxqg8SJgwtvq=G9ZytAGhpZ=Q7MwJNPsm-XYs0p_zo-7ug@mail.gmail.com>
Date: Sat, 23 May 2020 22:06:43 -0700
From: Erik Kline <ek@...gle.com>
To: "Ian K. Coolidge" <icoolidge@...gle.com>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] iproute2: ip addr: Accept 'optimistic' flag
patched and tested on a 5.6.13 system
Acked-by: Erik Kline <ek@...gle.com>
On Sat, 23 May 2020 at 19:01, Ian K. Coolidge <icoolidge@...gle.com> wrote:
>
> This allows addresses added to use IPv6 optimistic DAD.
> ---
> ip/ipaddress.c | 7 ++++++-
> man/man8/ip-address.8.in | 7 ++++++-
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
> index 80d27ce2..48cf5e41 100644
> --- a/ip/ipaddress.c
> +++ b/ip/ipaddress.c
> @@ -72,7 +72,7 @@ static void usage(void)
> " [-]tentative | [-]deprecated | [-]dadfailed | temporary |\n"
> " CONFFLAG-LIST ]\n"
> "CONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\n"
> - "CONFFLAG := [ home | nodad | mngtmpaddr | noprefixroute | autojoin ]\n"
> + "CONFFLAG := [ home | nodad | optimistic | mngtmpaddr | noprefixroute | autojoin ]\n"
> "LIFETIME := [ valid_lft LFT ] [ preferred_lft LFT ]\n"
> "LFT := forever | SECONDS\n"
> "TYPE := { vlan | veth | vcan | vxcan | dummy | ifb | macvlan | macvtap |\n"
> @@ -2335,6 +2335,11 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
> ifa_flags |= IFA_F_HOMEADDRESS;
> else
> fprintf(stderr, "Warning: home option can be set only for IPv6 addresses\n");
> + } else if (strcmp(*argv, "optimistic") == 0) {
> + if (req.ifa.ifa_family == AF_INET6)
> + ifa_flags |= IFA_F_OPTIMISTIC;
> + else
> + fprintf(stderr, "Warning: optimistic option can be set only for IPv6 addresses\n");
> } else if (strcmp(*argv, "nodad") == 0) {
> if (req.ifa.ifa_family == AF_INET6)
> ifa_flags |= IFA_F_NODAD;
> diff --git a/man/man8/ip-address.8.in b/man/man8/ip-address.8.in
> index 2a553190..fe773c91 100644
> --- a/man/man8/ip-address.8.in
> +++ b/man/man8/ip-address.8.in
> @@ -92,7 +92,7 @@ ip-address \- protocol address management
>
> .ti -8
> .IR CONFFLAG " := "
> -.RB "[ " home " | " mngtmpaddr " | " nodad " | " noprefixroute " | " autojoin " ]"
> +.RB "[ " home " | " mngtmpaddr " | " nodad " | " optimstic " | " noprefixroute " | " autojoin " ]"
>
> .ti -8
> .IR LIFETIME " := [ "
> @@ -258,6 +258,11 @@ stateless auto-configuration was active.
> (IPv6 only) do not perform Duplicate Address Detection (RFC 4862) when
> adding this address.
>
> +.TP
> +.B optimistic
> +(IPv6 only) When performing Duplicate Address Detection, use the RFC 4429
> +optimistic variant.
> +
> .TP
> .B noprefixroute
> Do not automatically create a route for the network prefix of the added
> --
> 2.27.0.rc0.183.gde8f92d652-goog
>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (3842 bytes)
Powered by blists - more mailing lists