Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IPV6]: small fix for ipv6_dev_get_saddr(...)

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>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yan Zheng and committed by
David S. Miller
12da2a43 4060994c

+3 -2
+3 -2
net/ipv6/addrconf.c
··· 1045 1045 } 1046 1046 #endif 1047 1047 /* Rule 8: Use longest matching prefix */ 1048 - if (hiscore.rule < 8) 1048 + if (hiscore.rule < 8) { 1049 1049 hiscore.matchlen = ipv6_addr_diff(&ifa_result->addr, daddr); 1050 - score.rule++; 1050 + hiscore.rule++; 1051 + } 1051 1052 score.matchlen = ipv6_addr_diff(&ifa->addr, daddr); 1052 1053 if (score.matchlen > hiscore.matchlen) { 1053 1054 score.rule = 8;