Fix for fd leak when using TCP/IP forwarding
Matt Johnston
matt at ucc.asn.au
Fri Jul 8 23:06:50 WST 2005
On Thu, Jun 23, 2005 at 06:25:31PM +0300, Ari Hyttinen wrote:
> I encountered a FD leak in closechanfd function when using dbclient with
> -L and -R options at the same time. Every forwarded connection
> (-R-direction) would leave an unclosed fd. I don't know if the leak
> happens in other circumstances, I'm using only client and with both -L
> and -R.
>
> Below is a fix. It's not well tested, but seems to stop the leak, at
> least. I haven't looked at the code before today, so maybe somebody
> more familiar with dropbear could comment on it...?
Ah yes. I hadn't realised that shutdown() on read and write
doesn't have the same effect as close() - your fix (with a
slight change) will be in 0.46.
Many thanks,
Matt
More information about the Dropbear
mailing list