[PATCH]IPv6: small fix for ipv6_dev_get_saddr(...)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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<[email protected]>

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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux