aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_hashtables.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r--include/net/inet_hashtables.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index bb619d80f2e2..3522bbcd546d 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -16,6 +16,7 @@
16 16
17 17
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/ip.h>
19#include <linux/ipv6.h> 20#include <linux/ipv6.h>
20#include <linux/list.h> 21#include <linux/list.h>
21#include <linux/slab.h> 22#include <linux/slab.h>
@@ -28,6 +29,7 @@
28#include <net/inet_connection_sock.h> 29#include <net/inet_connection_sock.h>
29#include <net/inet_sock.h> 30#include <net/inet_sock.h>
30#include <net/sock.h> 31#include <net/sock.h>
32#include <net/route.h>
31#include <net/tcp_states.h> 33#include <net/tcp_states.h>
32#include <net/netns/hash.h> 34#include <net/netns/hash.h>
33 35
@@ -371,6 +373,18 @@ static inline struct sock *inet_lookup(struct net *net,
371 return sk; 373 return sk;
372} 374}
373 375
376static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo,
377 struct sk_buff *skb,
378 const __be16 sport,
379 const __be16 dport)
380{
381 const struct iphdr *iph = ip_hdr(skb);
382
383 return __inet_lookup(dev_net(skb->dst->dev), hashinfo,
384 iph->saddr, sport,
385 iph->daddr, dport, inet_iif(skb));
386}
387
374extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, 388extern int __inet_hash_connect(struct inet_timewait_death_row *death_row,
375 struct sock *sk, u32 port_offset, 389 struct sock *sk, u32 port_offset,
376 int (*check_established)(struct inet_timewait_death_row *, 390 int (*check_established)(struct inet_timewait_death_row *,