aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-07-26 08:18:11 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-26 18:50:39 -0400
commitc7109986db3c945f50ceed884a30e0fd8af3b89b (patch)
treec0852e90a7d06bdc95a54d6adad19d2a9e3d7d5e /include/net
parentc6cffba4ffa26a8ffacd0bb9f3144e34f20da7de (diff)
ipv6: Early TCP socket demux
This is the IPv6 missing bits for infrastructure added in commit 41063e9dd1195 (ipv4: Early TCP socket demux.) Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/inet6_hashtables.h13
-rw-r--r--include/net/protocol.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index 00cbb4384c7..9e34c877a77 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -96,14 +96,15 @@ static inline struct sock *__inet6_lookup_skb(struct inet_hashinfo *hashinfo,
96 const __be16 sport, 96 const __be16 sport,
97 const __be16 dport) 97 const __be16 dport)
98{ 98{
99 struct sock *sk; 99 struct sock *sk = skb_steal_sock(skb);
100 100
101 if (unlikely(sk = skb_steal_sock(skb))) 101 if (sk)
102 return sk; 102 return sk;
103 else return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, 103
104 &ipv6_hdr(skb)->saddr, sport, 104 return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo,
105 &ipv6_hdr(skb)->daddr, ntohs(dport), 105 &ipv6_hdr(skb)->saddr, sport,
106 inet6_iif(skb)); 106 &ipv6_hdr(skb)->daddr, ntohs(dport),
107 inet6_iif(skb));
107} 108}
108 109
109extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, 110extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 057f2d31556..929528c73fe 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -52,6 +52,8 @@ struct net_protocol {
52 52
53#if IS_ENABLED(CONFIG_IPV6) 53#if IS_ENABLED(CONFIG_IPV6)
54struct inet6_protocol { 54struct inet6_protocol {
55 void (*early_demux)(struct sk_buff *skb);
56
55 int (*handler)(struct sk_buff *skb); 57 int (*handler)(struct sk_buff *skb);
56 58
57 void (*err_handler)(struct sk_buff *skb, 59 void (*err_handler)(struct sk_buff *skb,