summaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 87bd7aff88b4..a050b70b9101 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -326,6 +326,19 @@ static struct sock *__udp6_lib_lookup_skb(struct sk_buff *skb,
326 udptable, skb); 326 udptable, skb);
327} 327}
328 328
329struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
330 __be16 sport, __be16 dport)
331{
332 const struct ipv6hdr *iph = ipv6_hdr(skb);
333 const struct net_device *dev =
334 skb_dst(skb) ? skb_dst(skb)->dev : skb->dev;
335
336 return __udp6_lib_lookup(dev_net(dev), &iph->saddr, sport,
337 &iph->daddr, dport, inet6_iif(skb),
338 &udp_table, skb);
339}
340EXPORT_SYMBOL_GPL(udp6_lib_lookup_skb);
341
329/* Must be called under rcu_read_lock(). 342/* Must be called under rcu_read_lock().
330 * Does increment socket refcount. 343 * Does increment socket refcount.
331 */ 344 */