diff options
author | Tom Herbert <tom@herbertland.com> | 2016-04-05 08:22:50 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-07 16:53:14 -0400 |
commit | 63058308cd55182bbfd7a87970bd57883fcfbd2e (patch) | |
tree | 9acc3eeb49074f52f22756facf5749f7af107cdd /include | |
parent | 0340d0b9e0e2dc340acb664f19d6550940b22cde (diff) |
udp: Add udp6_lib_lookup_skb and udp4_lib_lookup_skb
Add externally visible functions to lookup a UDP socket by skb. This
will be used for GRO in UDP sockets. These functions also check
if skb->dst is set, and if it is not skb->dev is used to get dev_net.
This allows calling lookup functions before dst has been set on the
skbuff.
Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/udp.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/udp.h b/include/net/udp.h index a0b0da97164c..3aa0b3ec1fb0 100644 --- a/include/net/udp.h +++ b/include/net/udp.h @@ -269,6 +269,8 @@ struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, __be32 daddr, __be16 dport, int dif, struct udp_table *tbl, struct sk_buff *skb); +struct sock *udp4_lib_lookup_skb(struct sk_buff *skb, + __be16 sport, __be16 dport); struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, __be16 dport, @@ -278,6 +280,8 @@ struct sock *__udp6_lib_lookup(struct net *net, const struct in6_addr *daddr, __be16 dport, int dif, struct udp_table *tbl, struct sk_buff *skb); +struct sock *udp6_lib_lookup_skb(struct sk_buff *skb, + __be16 sport, __be16 dport); /* * SNMP statistics for UDP and UDP-Lite |