Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[pandora-kernel.git] / net / xfrm / xfrm_hash.h
index d3abb0b..d401dc8 100644 (file)
@@ -41,27 +41,28 @@ static inline unsigned int __xfrm_dst_hash(xfrm_address_t *daddr, xfrm_address_t
        return (h ^ (h >> 16)) & hmask;
 }
 
-static inline unsigned __xfrm_src_hash(xfrm_address_t *saddr,
+static inline unsigned __xfrm_src_hash(xfrm_address_t *daddr,
+                                      xfrm_address_t *saddr,
                                       unsigned short family,
                                       unsigned int hmask)
 {
        unsigned int h = family;
        switch (family) {
        case AF_INET:
-               h ^= __xfrm4_addr_hash(saddr);
+               h ^= __xfrm4_daddr_saddr_hash(daddr, saddr);
                break;
        case AF_INET6:
-               h ^= __xfrm6_addr_hash(saddr);
+               h ^= __xfrm6_daddr_saddr_hash(daddr, saddr);
                break;
        };
        return (h ^ (h >> 16)) & hmask;
 }
 
 static inline unsigned int
-__xfrm_spi_hash(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family,
+__xfrm_spi_hash(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family,
                unsigned int hmask)
 {
-       unsigned int h = spi ^ proto;
+       unsigned int h = (__force u32)spi ^ proto;
        switch (family) {
        case AF_INET:
                h ^= __xfrm4_addr_hash(daddr);