aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2012-10-22 23:35:06 +0000
committerDavid S. Miller <davem@davemloft.net>2012-10-23 13:03:45 -0400
commitb3ce5ae1fb6ba45c70e7c4d144182d38f0b0aef7 (patch)
treee1c639e36137fe431afd1e1060dad26e252991ae /net/ipv6/route.c
parentbe2net: Fix smatch warnings in be_main.c (diff)
downloadlinux-dev-b3ce5ae1fb6ba45c70e7c4d144182d38f0b0aef7.tar.xz
linux-dev-b3ce5ae1fb6ba45c70e7c4d144182d38f0b0aef7.zip
ipv6: fix sparse warnings in rt6_info_hash_nhsfn()
Adding by commit 51ebd3181572 which adds the support of ECMP for IPv6. Spotted-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv6/route.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 126da562d3eb..c42650cf8d4d 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -397,32 +397,32 @@ static int rt6_info_hash_nhsfn(unsigned int candidate_count,
{
unsigned int val = fl6->flowi6_proto;
- val ^= fl6->daddr.s6_addr32[0];
- val ^= fl6->daddr.s6_addr32[1];
- val ^= fl6->daddr.s6_addr32[2];
- val ^= fl6->daddr.s6_addr32[3];
+ val ^= (__force u32)fl6->daddr.s6_addr32[0];
+ val ^= (__force u32)fl6->daddr.s6_addr32[1];
+ val ^= (__force u32)fl6->daddr.s6_addr32[2];
+ val ^= (__force u32)fl6->daddr.s6_addr32[3];
- val ^= fl6->saddr.s6_addr32[0];
- val ^= fl6->saddr.s6_addr32[1];
- val ^= fl6->saddr.s6_addr32[2];
- val ^= fl6->saddr.s6_addr32[3];
+ val ^= (__force u32)fl6->saddr.s6_addr32[0];
+ val ^= (__force u32)fl6->saddr.s6_addr32[1];
+ val ^= (__force u32)fl6->saddr.s6_addr32[2];
+ val ^= (__force u32)fl6->saddr.s6_addr32[3];
/* Work only if this not encapsulated */
switch (fl6->flowi6_proto) {
case IPPROTO_UDP:
case IPPROTO_TCP:
case IPPROTO_SCTP:
- val ^= fl6->fl6_sport;
- val ^= fl6->fl6_dport;
+ val ^= (__force u16)fl6->fl6_sport;
+ val ^= (__force u16)fl6->fl6_dport;
break;
case IPPROTO_ICMPV6:
- val ^= fl6->fl6_icmp_type;
- val ^= fl6->fl6_icmp_code;
+ val ^= (__force u16)fl6->fl6_icmp_type;
+ val ^= (__force u16)fl6->fl6_icmp_code;
break;
}
/* RFC6438 recommands to use flowlabel */
- val ^= fl6->flowlabel;
+ val ^= (__force u32)fl6->flowlabel;
/* Perhaps, we need to tune, this function? */
val = val ^ (val >> 7) ^ (val >> 12);