diff options
author | Steven Barth <steven@midlink.org> | 2013-02-01 12:05:33 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-02-01 12:05:33 +0100 |
commit | e69df66491b6d6d244c3274ae36f7b640bd07a5e (patch) | |
tree | 0d4801b34274035b4ab24c20fc27a6c2106d6e8f /src/ra.c | |
parent | f0a2d256fc56bf87cfc7588d018fc7dbcf2503ae (diff) | |
download | odhcp6c-e69df66491b6d6d244c3274ae36f7b640bd07a5e.tar.gz |
Detect more DADFAILED cases
Diffstat (limited to 'src/ra.c')
-rw-r--r-- | src/ra.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -149,9 +149,9 @@ bool ra_rtnl_process(void) nh = NLMSG_NEXT(nh, len)) { struct ifaddrmsg *ifa = NLMSG_DATA(nh); struct in6_addr *addr = NULL; - if (nh->nlmsg_type != RTM_NEWADDR || NLMSG_PAYLOAD(nh, 0) < sizeof(*ifa) || - !(ifa->ifa_flags & IFA_F_DADFAILED) || - ifa->ifa_index != if_index) + if (NLMSG_PAYLOAD(nh, 0) < sizeof(*ifa) || ifa->ifa_index != if_index || + (nh->nlmsg_type == RTM_NEWADDR && !(ifa->ifa_flags & IFA_F_DADFAILED)) || + (nh->nlmsg_type == RTM_DELADDR && !(ifa->ifa_flags & IFA_F_TENTATIVE))) continue; ssize_t alen = NLMSG_PAYLOAD(nh, sizeof(*ifa)); |