diff options
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 00cbb4384c79..9e34c877a770 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 | ||
109 | extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, | 110 | extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, |