[Click] Socket delayed read

Christine Jones cej at bbn.com
Thu Jul 19 09:25:09 EDT 2012


Hello!

I am using Click to set up a router that installs a proxy service for a subset of traffic. Much of the traffic flowing through the router is forwarded as normal. But some traffic that meets certain criteria is sent to the proxy (a user-space process on the local machine). The proxy also sends packets and other state back to the Click router.

There are two versions of this router, kernel and user-level. I am encountering a problem with the user-level version. The communication between router and proxy is via the Socket element configured to be a unix socket, as such...

proxy :: Socket(UNIX, 'pathname', CLIENT true)

FromDevice
	...
	-> proxy;

proxy
	...
	-> Queue
	-> RawSocket(TCP);

The problem is that when the router has a period in which no packets are forwarded to the proxy the socket may not be read (although the socket is configured for reading in the select loop and there is data waiting from the proxy). If I force the router to write to that socket (with a periodic keep-alive) then the socket will be read. However, I would prefer to not have to rely on keep-alives. The socket should be selected when there is data to read.

Any thoughts?

Thanks!

Christine


More information about the click mailing list