lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 25 Jan 2007 15:18:59 -0500 From: Vlad Yasevich <vladislav.yasevich@...com> To: Neil Horman <nhorman@...driver.com> Cc: Sridhar Samudrala <sri@...ibm.com>, YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@...ux-ipv6.org>, davem@...emloft.net, kuznet@....inr.ac.ru, pekkas@...core.fi, jmorris@...ei.org, kaber@...eworks.de, netdev@...r.kernel.org Subject: Re: [PATCH] IPv6: Implement RFC 4429 Optimistic Duplicate Address Detection Hi Neil > @@ -1027,15 +1029,17 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev, > } > } > > - /* Rule 3: Avoid deprecated address */ > + /* Rule 3: Avoid deprecated and optimistic address */ > if (hiscore.rule < 3) { > if (ipv6_saddr_preferred(hiscore.addr_type) || > - !(ifa_result->flags & IFA_F_DEPRECATED)) > + ((!(ifa_result->flags & IFA_F_DEPRECATED)) && > + (!(ifa_result->flags & IFA_F_OPTIMISTIC)))) One style comment. Looks like some extra parenthesis that I don't thing are needed. I think you can say + (!(ifa_result->flags & IFA_F_DEPRECATED)) && + !(ifa_result->flags & IFA_F_OPTIMISTIC)))) > hiscore.attrs |= IPV6_SADDR_SCORE_PREFERRED; > hiscore.rule++; > } > if (ipv6_saddr_preferred(score.addr_type) || > - !(ifa->flags & IFA_F_DEPRECATED)) { > + ((!(ifa->flags & IFA_F_DEPRECATED)) && > + (!(ifa_result->flags & IFA_F_OPTIMISTIC)))) { same here. > score.attrs |= IPV6_SADDR_SCORE_PREFERRED; > if (!(hiscore.attrs & IPV6_SADDR_SCORE_PREFERRED)) { > score.rule = 3; -vlad - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists