is it proper to do sk->sk_prot->unhash(sk) on a socket from a kernel module?

From: Deep Datta <hidden>
Date: 2009-03-03 10:24:44

Hi,

I want to have a set of send-only UDP sockets in my kernel module (The
receives will all be handled by a single socket bound to port n &
INADDR_ANY). 

So I did a bind(), connect()and sk->sk_prot->unhash(sk) on the sockets 
such that udp_rcv()/udpv6_rcv() will not find these socket when it does
a udp_vx_lookup(), instead pushing all the packets into the single
receive socket.
These unhashed sockets are only used to do udp_sendpage().

My questions are:
Are there any issues with this approach? 
Can this design break with changes in future kernel?
Are there any other proper ways to have a send-only UDP socket?

Thanks in advance,
Deep
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help