netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]IPv6: small fix for ipv6_dev_get_saddr(...)
@ 2005-11-14 10:42 Yan Zheng
  2005-11-15  1:22 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 3+ messages in thread
From: Yan Zheng @ 2005-11-14 10:42 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, yoshfuji

The "score.rule++" doesn't make any sense for me. 
According to codes above, I think it should be "hiscore.rule++;" .


Signed-off-by: Yan Zheng<yanzheng@21cn.com>

Index: net/ipv6/addrconf.c
============================================================
--- a/net/ipv6/addrconf.c	2005-11-13 12:23:06.000000000 +0800
+++ b/net/ipv6/addrconf.c	2005-11-14 18:29:27.000000000 +0800
@@ -1045,9 +1045,10 @@ int ipv6_dev_get_saddr(struct net_device
 			}
 #endif
 			/* Rule 8: Use longest matching prefix */
-			if (hiscore.rule < 8)
+			if (hiscore.rule < 8) {
 				hiscore.matchlen = ipv6_addr_diff(&ifa_result->addr, daddr);
-			score.rule++;
+				hiscore.rule++;
+			}
 			score.matchlen = ipv6_addr_diff(&ifa->addr, daddr);
 			if (score.matchlen > hiscore.matchlen) {
 				score.rule = 8;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]IPv6: small fix for ipv6_dev_get_saddr(...)
  2005-11-14 10:42 [PATCH]IPv6: small fix for ipv6_dev_get_saddr(...) Yan Zheng
@ 2005-11-15  1:22 ` YOSHIFUJI Hideaki / 吉藤英明
  2005-11-15  5:42   ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2005-11-15  1:22 UTC (permalink / raw)
  To: yanzheng, davem; +Cc: netdev, linux-kernel, yoshfuji

In article <43786A16.9070100@21cn.com> (at Mon, 14 Nov 2005 18:42:30 +0800), Yan Zheng <yanzheng@21cn.com> says:

> The "score.rule++" doesn't make any sense for me. 
> According to codes above, I think it should be "hiscore.rule++;" .

Oops, you're right.

> Signed-off-by: Yan Zheng<yanzheng@21cn.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

>  			/* Rule 8: Use longest matching prefix */
> -			if (hiscore.rule < 8)
> +			if (hiscore.rule < 8) {
>  				hiscore.matchlen = ipv6_addr_diff(&ifa_result->addr, daddr);
> -			score.rule++;
> +				hiscore.rule++;
> +			}
>  			score.matchlen = ipv6_addr_diff(&ifa->addr, daddr);
>  			if (score.matchlen > hiscore.matchlen) {
>  				score.rule = 8;
> 

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]IPv6: small fix for ipv6_dev_get_saddr(...)
  2005-11-15  1:22 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2005-11-15  5:42   ` David S. Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-11-15  5:42 UTC (permalink / raw)
  To: yoshfuji; +Cc: yanzheng, netdev, linux-kernel

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Tue, 15 Nov 2005 10:22:37 +0900 (JST)

> In article <43786A16.9070100@21cn.com> (at Mon, 14 Nov 2005 18:42:30 +0800), Yan Zheng <yanzheng@21cn.com> says:
> 
> > The "score.rule++" doesn't make any sense for me. 
> > According to codes above, I think it should be "hiscore.rule++;" .
> 
> Oops, you're right.
> 
> > Signed-off-by: Yan Zheng<yanzheng@21cn.com>
> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-15  5:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 10:42 [PATCH]IPv6: small fix for ipv6_dev_get_saddr(...) Yan Zheng
2005-11-15  1:22 ` YOSHIFUJI Hideaki / 吉藤英明
2005-11-15  5:42   ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).