All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ian K. Coolidge" <icoolidge@google.com>
To: netdev@vger.kernel.org
Cc: ek@google.com, "Ian K. Coolidge" <icoolidge@google.com>
Subject: [PATCH v2 2/2] iproute2: ip addr: Add support for setting 'optimistic'
Date: Wed, 27 May 2020 11:03:46 -0700	[thread overview]
Message-ID: <20200527180346.58573-2-icoolidge@google.com> (raw)
In-Reply-To: <20200527180346.58573-1-icoolidge@google.com>

optimistic DAD is controllable via sysctl for an interface
or all interfaces on the system. This would affect addresses
added by the kernel only.

Recent kernels, however, have enabled support for adding optimistic
address via userspace. This plumbs that support.
---
 ip/ipaddress.c           | 2 +-
 man/man8/ip-address.8.in | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 403f7010..3b53933f 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1243,7 +1243,7 @@ static const struct ifa_flag_data_t {
 	{ .name = "secondary",		.mask = IFA_F_SECONDARY,	.readonly = true,	.v6only = false},
 	{ .name = "temporary",		.mask = IFA_F_SECONDARY,	.readonly = true,	.v6only = false},
 	{ .name = "nodad",		.mask = IFA_F_NODAD,	 	.readonly = false,	.v6only = true},
-	{ .name = "optimistic",		.mask = IFA_F_OPTIMISTIC,	.readonly = true,	.v6only = true},
+	{ .name = "optimistic",		.mask = IFA_F_OPTIMISTIC,	.readonly = false,	.v6only = true},
 	{ .name = "dadfailed",		.mask = IFA_F_DADFAILED,	.readonly = true,	.v6only = true},
 	{ .name = "home",		.mask = IFA_F_HOMEADDRESS,	.readonly = false,	.v6only = true},
 	{ .name = "deprecated",		.mask = IFA_F_DEPRECATED,	.readonly = true,	.v6only = true},
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


  reply	other threads:[~2020-05-27 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24  1:51 [PATCH] iproute2: ip addr: Accept 'optimistic' flag Ian K. Coolidge
2020-05-24  5:06 ` Erik Kline
2020-05-24 19:09 ` Stephen Hemminger
2020-05-27 18:03 ` [PATCH v2 1/2] iproute2: ip addr: Organize flag properties structurally Ian K. Coolidge
2020-05-27 18:03   ` Ian K. Coolidge [this message]
2020-05-31 23:09   ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200527180346.58573-2-icoolidge@google.com \
    --to=icoolidge@google.com \
    --cc=ek@google.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.