]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: ip addr: Add support for setting 'optimistic'
authorIan K. Coolidge <icoolidge@google.com>
Wed, 27 May 2020 18:03:46 +0000 (11:03 -0700)
committerDavid Ahern <dsahern@gmail.com>
Sun, 31 May 2020 23:01:33 +0000 (23:01 +0000)
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>
ip/ipaddress.c
man/man8/ip-address.8.in

index 403f70109057337e506dcdb6a66874fe3c53d68b..3b53933f41673a5366aa567f75e8d94640e1ec7b 100644 (file)
@@ -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},
index 2a553190a37e994e1ecd88d53471268c36404ca1..fe773c91592fb767d2c1c233798f9dc823ad7c88 100644 (file)
@@ -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