[ICSK]: Generalise tcp_listen_{start,stop}
This also moved inet_iif from tcp to inet_hashtables.h, as it is needed by the inet_lookup callers, perhaps this needs a bit of polishing, but for now seems fine. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9f1d2604c7
commit
0a5578cf8e
@@ -26,6 +26,7 @@
|
||||
#include <linux/wait.h>
|
||||
|
||||
#include <net/inet_connection_sock.h>
|
||||
#include <net/route.h>
|
||||
#include <net/sock.h>
|
||||
#include <net/tcp_states.h>
|
||||
|
||||
@@ -280,6 +281,11 @@ out:
|
||||
wake_up(&hashinfo->lhash_wait);
|
||||
}
|
||||
|
||||
static inline int inet_iif(const struct sk_buff *skb)
|
||||
{
|
||||
return ((struct rtable *)skb->dst)->rt_iif;
|
||||
}
|
||||
|
||||
extern struct sock *__inet_lookup_listener(const struct hlist_head *head,
|
||||
const u32 daddr,
|
||||
const unsigned short hnum,
|
||||
|
Reference in New Issue
Block a user