aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_input.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-07-26 12:18:11 +0000
committerDavid S. Miller <davem@davemloft.net>2012-07-26 15:50:39 -0700
commitc7109986db3c945f50ceed884a30e0fd8af3b89b (patch)
treec0852e90a7d06bdc95a54d6adad19d2a9e3d7d5e /net/ipv6/ip6_input.c
parentipv4: Fix input route performance regression. (diff)
downloadlinux-dev-c7109986db3c945f50ceed884a30e0fd8af3b89b.tar.xz
linux-dev-c7109986db3c945f50ceed884a30e0fd8af3b89b.zip
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 'net/ipv6/ip6_input.c')
-rw-r--r--net/ipv6/ip6_input.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 5ab923e51af3..47975e363fcd 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -47,9 +47,18 @@
-inline int ip6_rcv_finish( struct sk_buff *skb)
+int ip6_rcv_finish(struct sk_buff *skb)
{
- if (skb_dst(skb) == NULL)
+ if (sysctl_ip_early_demux && !skb_dst(skb)) {
+ const struct inet6_protocol *ipprot;
+
+ rcu_read_lock();
+ ipprot = rcu_dereference(inet6_protos[ipv6_hdr(skb)->nexthdr]);
+ if (ipprot && ipprot->early_demux)
+ ipprot->early_demux(skb);
+ rcu_read_unlock();
+ }
+ if (!skb_dst(skb))
ip6_route_input(skb);
return dst_input(skb);