ip: add support for IFA_F_DADFAILED
Subsystems (2)
PATCH 1/1 ip: add support for IFA_F_DADFAILED
[I'm not sure if I needed to update if_addr.h, or if that will happen
automatically when you update the headers to 2.6.32]
Add support for IFA_F_DADFAILED and update ip.8 man page.
---
include/linux/if_addr.h +1 -0
@@ -41,6 +41,7 @@ enum#define IFA_F_NODAD 0x02#define IFA_F_OPTIMISTIC 0x04 +#define IFA_F_DADFAILED 0x08#define IFA_F_HOMEADDRESS 0x10#define IFA_F_DEPRECATED 0x20#define IFA_F_TENTATIVE 0x40
ip/ipaddress.c +10 -2
@@ -64,7 +64,7 @@ static void usage(void)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" );
@@ -74,7 +74,8 @@ static void usage(void)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" );
@@ -508,6 +509,10 @@ int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n,fprintf (fp,"dynamic " ); }else ifa->ifa_flags &= ~IFA_F_PERMANENT ; +if (ifa->ifa_flags&IFA_F_DADFAILED ) { + ifa->ifa_flags &= ~IFA_F_DADFAILED ; +fprintf (fp,"dadfailed " ); + }if (ifa->ifa_flags)fprintf (fp,"flags %02x " , ifa->ifa_flags);if (rta_tb[IFA_LABEL ])
@@ -655,6 +660,9 @@ static int ipaddr_list_or_flush(int argc, char **argv, int flush) }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;
man/man8/ip.8 +7 -2
@@ -97,7 +97,7 @@ ip \- show / manipulate routing, devices, policy routing and tunnels .ti -8 .IR FLAG " := " .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\ -tentative " | " deprecated " ]" +tentative " | " deprecated " | " dadfailed " ]" .ti -8 .BR "ip addrlabel" " { " add " | " del " } " prefix
@@ -1030,7 +1030,7 @@ addresses. .TP .B tentative -(IPv6 only) only list addresses which did not pass duplicate +(IPv6 only) only list addresses which have not yet passed duplicate address detection. .TP
@@ -1038,6 +1038,11 @@ address detection. (IPv6 only) only list deprecated addresses. .TP +.B dadfailed +(IPv6 only) only list addresses which have failed duplicate +address detection. + +.TP .BR primary " and " secondary only list primary (or secondary) addresses.
Hi Stephen,
Quoted 5 lines · Brian Haley
[I'm not sure if I needed to update
if_addr.h, or if that will happen
automatically when you update the headers to 2.6.32]Add support for
IFA_F_DADFAILEDand update ip.8 man page.
It looks like you applied a test patch I had sent Jens instead of this one. Can you revert that and apply this instead? Or I can send a new one based on your current git tree.
Thanks,
-Brian
Quoted 98 lines
Signed-off-by Brian Haley <[email protected]>---
include/linux/if_addr.h +1
-0@@ -41,6 +41,7 @@ enum#define IFA_F_NODAD 0x02#define IFA_F_OPTIMISTIC 0x04 +#define IFA_F_DADFAILED 0x08#define IFA_F_HOMEADDRESS 0x10#define IFA_F_DEPRECATED 0x20#define IFA_F_TENTATIVE 0x40ip/ipaddress.c +10
-2@@ -64,7 +64,7 @@ static void usage(void)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" );@@ -74,7 +74,8 @@ static void usage(void)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" );@@ -508,6 +509,10 @@ int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n,fprintf (fp,"dynamic " ); }else ifa->ifa_flags &= ~IFA_F_PERMANENT ; +if (ifa->ifa_flags&IFA_F_DADFAILED ) { + ifa->ifa_flags &= ~IFA_F_DADFAILED ; +fprintf (fp,"dadfailed " ); + }if (ifa->ifa_flags)fprintf (fp,"flags %02x " , ifa->ifa_flags);if (rta_tb[IFA_LABEL ])@@ -655,6 +660,9 @@ static int ipaddr_list_or_flush(int argc, char **argv, int flush) }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;man/man8/ip.8 +7
-3@@ -97,7 +97,7 @@ ip \- show / manipulate routing, devices, policy routing and tunnels .ti -8 .IR FLAG " := " .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\ -tentative " | " deprecated " ]" +tentative " | " deprecated " | " dadfailed " ]" .ti -8 .BR "ip addrlabel" " { " add " | " del " } " prefix@@ -1030,7 +1030,7 @@ addresses. .TP .B tentative -(IPv6 only) only list addresses which did not pass duplicate +(IPv6 only) only list addresses which have not yet passed duplicate address detection. .TP@@ -1038,6 +1038,11 @@ address detection. (IPv6 only) only list deprecated addresses. .TP +.B dadfailed +(IPv6 only) only list addresses which have failed duplicate +address detection. + +.TP .BR primary " and " secondary only list primary (or secondary) addresses. --To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · On Thu, 03 Dec 2009 14:39:19 -0500 Brian Haley <[email protected]> wrote:
Hi Stephen,
Quoted 4 lines · Brian Haley
[I'm not sure if I needed to update
if_addr.h, or if that will happen
automatically when you update the headers to 2.6.32]
Quoted 7 lines
Quoted 1 line
Add support for
IFA_F_DADFAILEDand update ip.8 man page.It looks like you applied a test patch I had sent Jens instead of this one. Can you revert that and apply this instead? Or I can send a new one based on your current git tree.
Thanks,
Delta would be easier.
[iproute2]: fix support for IFA_F_DADFAILED
Quoted 1 line · Stephen Hemminger
Delta would be easier.
Ok, here it is.
-Brian
Fix support for IFA_F_DADFAILED and update ip.8 man page.
---
ip/ipaddress.c +6 -2
@@ -62,7 +62,7 @@ static void usage(void)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 @@ static void usage(void)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" );
@@ -657,6 +658,9 @@ static int ipaddr_list_or_flush(int argc, char **argv, int flush) }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;
man/man8/ip.8 +7 -2
@@ -97,7 +97,7 @@ ip \- show / manipulate routing, devices, policy routing and tunnels .ti -8 .IR FLAG " := " .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\ -tentative " | " deprecated " ]" +tentative " | " deprecated " | " dadfailed " ]" .ti -8 .BR "ip addrlabel" " { " add " | " del " } " prefix
@@ -1030,7 +1030,7 @@ addresses. .TP .B tentative -(IPv6 only) only list addresses which did not pass duplicate +(IPv6 only) only list addresses which have not yet passed duplicate address detection. .TP
@@ -1038,6 +1038,11 @@ address detection. (IPv6 only) only list deprecated addresses. .TP +.B dadfailed +(IPv6 only) only list addresses which have failed duplicate +address detection. + +.TP .BR primary " and " secondary only list primary (or secondary) addresses.
David Miller
maintainerRe: [iproute2]: fix support for IFA_F_DADFAILED
From: Brian Haley <[email protected]>
Date: Thu, 03 Dec 2009 15:39:36 -0500
Quoted 4 lines
Quoted 1 line · Stephen Hemminger
Delta would be easier.
Ok, here it is.
This showed up in patchwork properly, FWIW.