udp: Export code sk lookup routines
The UDP diag get_exact handler will require them to find a socket by provided net, [sd]addr-s, [sd]ports and device. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1942c518ca
commit
fce823381e
@ -194,9 +194,15 @@ extern int udp_lib_setsockopt(struct sock *sk, int level, int optname,
|
|||||||
extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
|
extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
|
||||||
__be32 daddr, __be16 dport,
|
__be32 daddr, __be16 dport,
|
||||||
int dif);
|
int dif);
|
||||||
|
extern struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
|
||||||
|
__be32 daddr, __be16 dport,
|
||||||
|
int dif, struct udp_table *tbl);
|
||||||
extern struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport,
|
extern struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport,
|
||||||
const struct in6_addr *daddr, __be16 dport,
|
const struct in6_addr *daddr, __be16 dport,
|
||||||
int dif);
|
int dif);
|
||||||
|
extern struct sock *__udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport,
|
||||||
|
const struct in6_addr *daddr, __be16 dport,
|
||||||
|
int dif, struct udp_table *tbl);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SNMP statistics for UDP and UDP-Lite
|
* SNMP statistics for UDP and UDP-Lite
|
||||||
|
@ -445,7 +445,7 @@ exact_match:
|
|||||||
/* UDP is nearly always wildcards out the wazoo, it makes no sense to try
|
/* UDP is nearly always wildcards out the wazoo, it makes no sense to try
|
||||||
* harder than this. -DaveM
|
* harder than this. -DaveM
|
||||||
*/
|
*/
|
||||||
static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
|
struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
|
||||||
__be16 sport, __be32 daddr, __be16 dport,
|
__be16 sport, __be32 daddr, __be16 dport,
|
||||||
int dif, struct udp_table *udptable)
|
int dif, struct udp_table *udptable)
|
||||||
{
|
{
|
||||||
@ -512,6 +512,7 @@ begin:
|
|||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(__udp4_lib_lookup);
|
||||||
|
|
||||||
static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb,
|
static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb,
|
||||||
__be16 sport, __be16 dport,
|
__be16 sport, __be16 dport,
|
||||||
|
@ -238,7 +238,7 @@ exact_match:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sock *__udp6_lib_lookup(struct net *net,
|
struct sock *__udp6_lib_lookup(struct net *net,
|
||||||
const struct in6_addr *saddr, __be16 sport,
|
const struct in6_addr *saddr, __be16 sport,
|
||||||
const struct in6_addr *daddr, __be16 dport,
|
const struct in6_addr *daddr, __be16 dport,
|
||||||
int dif, struct udp_table *udptable)
|
int dif, struct udp_table *udptable)
|
||||||
@ -305,6 +305,7 @@ begin:
|
|||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(__udp6_lib_lookup);
|
||||||
|
|
||||||
static struct sock *__udp6_lib_lookup_skb(struct sk_buff *skb,
|
static struct sock *__udp6_lib_lookup_skb(struct sk_buff *skb,
|
||||||
__be16 sport, __be16 dport,
|
__be16 sport, __be16 dport,
|
||||||
|
Loading…
Reference in New Issue
Block a user