Add dadfailed option to ip command
Fix support for IFA_F_DADFAILED and update ip.8 man page.
Signed-off-by: Brian Haley <brian.haley@hp.com>
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index c638ca7..91c7b1b 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -62,7 +62,7 @@
iplink_usage();
}
fprintf(stderr, "Usage: ip addr {add|change|replace} IFADDR dev STRING [ LIFETIME ]\n");
- fprintf(stderr, " [ CONFFLAG-LIST]\n");
+ fprintf(stderr, " [ CONFFLAG-LIST ]\n");
fprintf(stderr, " ip addr del IFADDR dev STRING\n");
fprintf(stderr, " ip addr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]\n");
fprintf(stderr, " [ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ]\n");
@@ -72,7 +72,8 @@
fprintf(stderr, "SCOPE-ID := [ host | link | global | NUMBER ]\n");
fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] FLAG\n");
fprintf(stderr, "FLAG := [ permanent | dynamic | secondary | primary |\n");
- fprintf(stderr, " tentative | deprecated | CONFFLAG-LIST ]\n");
+ fprintf(stderr, " tentative | deprecated | dadfailed |\n");
+ fprintf(stderr, " CONFFLAG-LIST ]\n");
fprintf(stderr, "CONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\n");
fprintf(stderr, "CONFFLAG := [ home | nodad ]\n");
fprintf(stderr, "LIFETIME := [ valid_lft LFT ] [ preferred_lft LFT ]\n");
@@ -678,6 +679,9 @@
} else if (strcmp(*argv, "nodad") == 0) {
filter.flags |= IFA_F_NODAD;
filter.flagmask |= IFA_F_NODAD;
+ } else if (strcmp(*argv, "dadfailed") == 0) {
+ filter.flags |= IFA_F_DADFAILED;
+ filter.flagmask |= IFA_F_DADFAILED;
} else if (strcmp(*argv, "label") == 0) {
NEXT_ARG();
filter.label = *argv;