aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan K. Coolidge <icoolidge@google.com>2020-05-27 11:03:46 -0700
committerDavid Ahern <dsahern@gmail.com>2020-05-31 23:01:33 +0000
commit5413a735a68de792eb7db1644fb3e3b888356863 (patch)
treedc737fd6531a12775c333d74b040d743c50dd357
parent9d59c86e575b5373d73f021f569ae520bc229ec5 (diff)
downloadiproute2-5413a735a68de792eb7db1644fb3e3b888356863.tar.gz
iproute2: ip addr: Add support for setting 'optimistic'
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. Signed-off-by: David Ahern <dsahern@gmail.com>
-rw-r--r--ip/ipaddress.c2
-rw-r--r--man/man8/ip-address.8.in7
2 files changed, 7 insertions, 2 deletions
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 403f70109..3b53933f4 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 2a553190a..fe773c915 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 " := [ "
@@ -259,6 +259,11 @@ stateless auto-configuration was active.
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
address, and don't search for one to delete when removing the address. Changing