]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/udp.h
fat: Kill d_invalidate() in vfat_lookup()
[linux-2.6-omap-h63xx.git] / include / linux / udp.h
index 9c94312b2de53d1dacf49d0f26d360b8a413515f..0cf5c4c0ec81fe1afb8b8604241555b881144792 100644 (file)
@@ -38,6 +38,7 @@ struct udphdr {
 #ifdef __KERNEL__
 #include <net/inet_sock.h>
 #include <linux/skbuff.h>
+#include <net/netns/hash.h>
 
 static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
 {
@@ -46,9 +47,9 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
 
 #define UDP_HTABLE_SIZE                128
 
-static inline int udp_hashfn(const unsigned num)
+static inline int udp_hashfn(struct net *net, const unsigned num)
 {
-       return num & (UDP_HTABLE_SIZE - 1);
+       return (num + net_hash_mix(net)) & (UDP_HTABLE_SIZE - 1);
 }
 
 struct udp_sock {