]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
ipv6: Add IFA_F_DADFAILED flag
authorBrian Haley <brian.haley@hp.com>
Tue, 1 Dec 2009 23:58:44 +0000 (15:58 -0800)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Tue, 1 Dec 2009 23:58:44 +0000 (15:58 -0800)
Add IFA_F_DADFAILED flag to denote an IPv6 address that has
failed Duplicate Address Detection, that way tools like
/sbin/ip can be more informative.

3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:db8::1/64 scope global tentative dadfailed
       valid_lft forever preferred_lft forever

Signed-off-by: Brian Haley <brian.haley@hp.com>
ip/ipaddress.c

index 592d7c62a38d78626e535c360e6c3b6ecbe7db31..f0add80026ba8093859ba8178839b4fac7a61383 100644 (file)
@@ -506,6 +506,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])