aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorKOVACS Krisztian <hidden@sch.bme.hu>2008-10-01 10:48:10 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-01 10:48:10 -0400
commitbcd41303f422015ab662c9276d108414aa75b796 (patch)
tree18fc3d87f764615d7139f23b2792bbf89fc7a63b /net/ipv4/udp.c
parenta3116ac5c216fc3c145906a46df9ce542ff7dcf2 (diff)
udp: Export UDP socket lookup function
The iptables tproxy code has to be able to do UDP socket hash lookups, so we have to provide an exported lookup function for this purpose. Signed-off-by: KOVACS Krisztian <hidden@sch.bme.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 57e26fa66185..c83d0ef469c9 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -302,6 +302,13 @@ static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
302 return result; 302 return result;
303} 303}
304 304
305struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
306 __be32 daddr, __be16 dport, int dif)
307{
308 return __udp4_lib_lookup(net, saddr, sport, daddr, dport, dif, udp_hash);
309}
310EXPORT_SYMBOL_GPL(udp4_lib_lookup);
311
305static inline struct sock *udp_v4_mcast_next(struct sock *sk, 312static inline struct sock *udp_v4_mcast_next(struct sock *sk,
306 __be16 loc_port, __be32 loc_addr, 313 __be16 loc_port, __be32 loc_addr,
307 __be16 rmt_port, __be32 rmt_addr, 314 __be16 rmt_port, __be32 rmt_addr,