diff options
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r-- | include/net/inet_hashtables.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 67a8fa098e3a..ef83d9e844b5 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -81,7 +81,9 @@ struct inet_bind_bucket { | |||
81 | struct net *ib_net; | 81 | struct net *ib_net; |
82 | #endif | 82 | #endif |
83 | unsigned short port; | 83 | unsigned short port; |
84 | signed short fastreuse; | 84 | signed char fastreuse; |
85 | signed char fastreuseport; | ||
86 | kuid_t fastuid; | ||
85 | int num_owners; | 87 | int num_owners; |
86 | struct hlist_node node; | 88 | struct hlist_node node; |
87 | struct hlist_head owners; | 89 | struct hlist_head owners; |
@@ -92,8 +94,8 @@ static inline struct net *ib_net(struct inet_bind_bucket *ib) | |||
92 | return read_pnet(&ib->ib_net); | 94 | return read_pnet(&ib->ib_net); |
93 | } | 95 | } |
94 | 96 | ||
95 | #define inet_bind_bucket_for_each(tb, pos, head) \ | 97 | #define inet_bind_bucket_for_each(tb, head) \ |
96 | hlist_for_each_entry(tb, pos, head, node) | 98 | hlist_for_each_entry(tb, head, node) |
97 | 99 | ||
98 | struct inet_bind_hashbucket { | 100 | struct inet_bind_hashbucket { |
99 | spinlock_t lock; | 101 | spinlock_t lock; |
@@ -257,15 +259,19 @@ extern void inet_unhash(struct sock *sk); | |||
257 | 259 | ||
258 | extern struct sock *__inet_lookup_listener(struct net *net, | 260 | extern struct sock *__inet_lookup_listener(struct net *net, |
259 | struct inet_hashinfo *hashinfo, | 261 | struct inet_hashinfo *hashinfo, |
262 | const __be32 saddr, | ||
263 | const __be16 sport, | ||
260 | const __be32 daddr, | 264 | const __be32 daddr, |
261 | const unsigned short hnum, | 265 | const unsigned short hnum, |
262 | const int dif); | 266 | const int dif); |
263 | 267 | ||
264 | static inline struct sock *inet_lookup_listener(struct net *net, | 268 | static inline struct sock *inet_lookup_listener(struct net *net, |
265 | struct inet_hashinfo *hashinfo, | 269 | struct inet_hashinfo *hashinfo, |
270 | __be32 saddr, __be16 sport, | ||
266 | __be32 daddr, __be16 dport, int dif) | 271 | __be32 daddr, __be16 dport, int dif) |
267 | { | 272 | { |
268 | return __inet_lookup_listener(net, hashinfo, daddr, ntohs(dport), dif); | 273 | return __inet_lookup_listener(net, hashinfo, saddr, sport, |
274 | daddr, ntohs(dport), dif); | ||
269 | } | 275 | } |
270 | 276 | ||
271 | /* Socket demux engine toys. */ | 277 | /* Socket demux engine toys. */ |
@@ -358,7 +364,8 @@ static inline struct sock *__inet_lookup(struct net *net, | |||
358 | struct sock *sk = __inet_lookup_established(net, hashinfo, | 364 | struct sock *sk = __inet_lookup_established(net, hashinfo, |
359 | saddr, sport, daddr, hnum, dif); | 365 | saddr, sport, daddr, hnum, dif); |
360 | 366 | ||
361 | return sk ? : __inet_lookup_listener(net, hashinfo, daddr, hnum, dif); | 367 | return sk ? : __inet_lookup_listener(net, hashinfo, saddr, sport, |
368 | daddr, hnum, dif); | ||
362 | } | 369 | } |
363 | 370 | ||
364 | static inline struct sock *inet_lookup(struct net *net, | 371 | static inline struct sock *inet_lookup(struct net *net, |