[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 3 Mar 2009 02:09:33 -0800
From: "Deep Datta" <ddatta@...acom.com>
To: <netdev@...r.kernel.org>
Subject: is it proper to do sk->sk_prot->unhash(sk) on a socket from a kernel module?
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists