diff options
author | Eric Dumazet <edumazet@google.com> | 2012-07-26 12:18:11 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-26 15:50:39 -0700 |
commit | c7109986db3c945f50ceed884a30e0fd8af3b89b (patch) | |
tree | c0852e90a7d06bdc95a54d6adad19d2a9e3d7d5e /include/net/inet6_hashtables.h | |
parent | c6cffba4ffa26a8ffacd0bb9f3144e34f20da7de (diff) | |
download | op-kernel-dev-c7109986db3c945f50ceed884a30e0fd8af3b89b.zip op-kernel-dev-c7109986db3c945f50ceed884a30e0fd8af3b89b.tar.gz |
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/inet6_hashtables.h')
-rw-r--r-- | include/net/inet6_hashtables.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index 00cbb43..9e34c87 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, const __be16 sport, const __be16 dport) { - struct sock *sk; + struct sock *sk = skb_steal_sock(skb); - if (unlikely(sk = skb_steal_sock(skb))) + if (sk) return sk; - else return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, - &ipv6_hdr(skb)->saddr, sport, - &ipv6_hdr(skb)->daddr, ntohs(dport), - inet6_iif(skb)); + + return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, + &ipv6_hdr(skb)->saddr, sport, + &ipv6_hdr(skb)->daddr, ntohs(dport), + inet6_iif(skb)); } extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, |