aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-11-14 01:55:29 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:53:56 -0500
commitc1ee656ccb3b03304d38f852debccdd1567702e6 (patch)
tree3debe7c94a5230709fe6705ac0f7036274983954 /net/ipv6/addrconf.c
parent294b4baf292197e13d1df1d253efa7ac84ffee3f (diff)
[IPV6] ADDRCONF: Rename ipv6_saddr_label() to ipv6_addr_label().
This patch renames ipv6_saddr_label() to ipv6_addr_label() because address label is used for both of source address and destination address. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c0720e4659bc..733374b68d2d 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -875,7 +875,7 @@ static inline int ipv6_saddr_preferred(int type)
875} 875}
876 876
877/* static matching label */ 877/* static matching label */
878static inline int ipv6_saddr_label(const struct in6_addr *addr, int type) 878static inline int ipv6_addr_label(const struct in6_addr *addr, int type)
879{ 879{
880 /* 880 /*
881 * prefix (longest match) label 881 * prefix (longest match) label
@@ -910,7 +910,7 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
910 struct inet6_ifaddr *ifa_result = NULL; 910 struct inet6_ifaddr *ifa_result = NULL;
911 int daddr_type = __ipv6_addr_type(daddr); 911 int daddr_type = __ipv6_addr_type(daddr);
912 int daddr_scope = __ipv6_addr_src_scope(daddr_type); 912 int daddr_scope = __ipv6_addr_src_scope(daddr_type);
913 u32 daddr_label = ipv6_saddr_label(daddr, daddr_type); 913 u32 daddr_label = ipv6_addr_label(daddr, daddr_type);
914 struct net_device *dev; 914 struct net_device *dev;
915 915
916 memset(&hiscore, 0, sizeof(hiscore)); 916 memset(&hiscore, 0, sizeof(hiscore));
@@ -1083,11 +1083,13 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
1083 1083
1084 /* Rule 6: Prefer matching label */ 1084 /* Rule 6: Prefer matching label */
1085 if (hiscore.rule < 6) { 1085 if (hiscore.rule < 6) {
1086 if (ipv6_saddr_label(&ifa_result->addr, hiscore.addr_type) == daddr_label) 1086 if (ipv6_addr_label(&ifa_result->addr,
1087 hiscore.addr_type) == daddr_label)
1087 hiscore.attrs |= IPV6_SADDR_SCORE_LABEL; 1088 hiscore.attrs |= IPV6_SADDR_SCORE_LABEL;
1088 hiscore.rule++; 1089 hiscore.rule++;
1089 } 1090 }
1090 if (ipv6_saddr_label(&ifa->addr, score.addr_type) == daddr_label) { 1091 if (ipv6_addr_label(&ifa->addr,
1092 score.addr_type) == daddr_label) {
1091 score.attrs |= IPV6_SADDR_SCORE_LABEL; 1093 score.attrs |= IPV6_SADDR_SCORE_LABEL;
1092 if (!(hiscore.attrs & IPV6_SADDR_SCORE_LABEL)) { 1094 if (!(hiscore.attrs & IPV6_SADDR_SCORE_LABEL)) {
1093 score.rule = 6; 1095 score.rule = 6;