summaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorFabio Baltieri <fabio.baltieri@linaro.org>2013-01-16 22:30:17 +0100
committerDavid S. Miller <davem@davemloft.net>2013-01-17 14:29:58 -0500
commit512613d7dde7b679597485e9335bd64e90df78fa (patch)
treed2dced33d326a9b2a75ecf095c3c4b4130bb7345 /include/net/ipv6.h
parentc2a936600f78aea00d3312ea4b66a79a4619f9b4 (diff)
downloadop-kernel-dev-512613d7dde7b679597485e9335bd64e90df78fa.zip
op-kernel-dev-512613d7dde7b679597485e9335bd64e90df78fa.tar.gz
ipv6: fix ipv6_prefix_equal64_half mask conversion
Fix the 64bit optimized version of ipv6_prefix_equal to convert the bitmask to network byte order only after the bit-shift. The bug was introduced in: 3867517 ipv6: 64bit version of ipv6_prefix_equal(). Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 51a068a..464c6f7 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -404,7 +404,7 @@ static inline bool __ipv6_prefix_equal64_half(const __be64 *a1,
const __be64 *a2,
unsigned int len)
{
- if (len && ((*a1 ^ *a2) & cpu_to_be64(~0UL) << (64 - len)))
+ if (len && ((*a1 ^ *a2) & cpu_to_be64((~0UL) << (64 - len))))
return false;
return true;
}
OpenPOWER on IntegriCloud