diff options
author | Eric Dumazet <edumazet@google.com> | 2012-07-26 08:18:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-26 18:50:39 -0400 |
commit | c7109986db3c945f50ceed884a30e0fd8af3b89b (patch) | |
tree | c0852e90a7d06bdc95a54d6adad19d2a9e3d7d5e /net/ipv6/ip6_input.c | |
parent | c6cffba4ffa26a8ffacd0bb9f3144e34f20da7de (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 'net/ipv6/ip6_input.c')
-rw-r--r-- | net/ipv6/ip6_input.c | 13 |
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 @@ | |||
47 | 47 | ||
48 | 48 | ||
49 | 49 | ||
50 | inline int ip6_rcv_finish( struct sk_buff *skb) | 50 | int ip6_rcv_finish(struct sk_buff *skb) |
51 | { | 51 | { |
52 | if (skb_dst(skb) == NULL) | 52 | if (sysctl_ip_early_demux && !skb_dst(skb)) { |
53 | const struct inet6_protocol *ipprot; | ||
54 | |||
55 | rcu_read_lock(); | ||
56 | ipprot = rcu_dereference(inet6_protos[ipv6_hdr(skb)->nexthdr]); | ||
57 | if (ipprot && ipprot->early_demux) | ||
58 | ipprot->early_demux(skb); | ||
59 | rcu_read_unlock(); | ||
60 | } | ||
61 | if (!skb_dst(skb)) | ||
53 | ip6_route_input(skb); | 62 | ip6_route_input(skb); |
54 | 63 | ||
55 | return dst_input(skb); | 64 | return dst_input(skb); |