[PATCH] tcp options fix

Guus Sliepen guus at tinc-vpn.org
Fri Jan 13 12:04:11 CET 2006


On Tue, Jan 10, 2006 at 11:27:47PM -0800, Scott Lamb wrote:

> >Attached is a patch that corrects two problems with TCP options:
> 
> Oops. This time with the patch.

Thanks, that's a neat patch!

> And the other problem I noticed - the extra packet each way - seems  
> to be that send_tcppacket does two writes - one through send_request,  
> one directly through send_meta. I see a comment "/* Evil hack. */" in  
> there. Is this what it's referring to?

I think I know what happens: when send_tcppacket() is called, it first
sends a small header indicating that a VPN packet is coming in (and how
big it is), then the packet itself follows. Because that means it does
two write() calls, and Nagle has been disabled, the kernel will send two
TCP packets. So, to make things a bit more efficient, send_tcppacket()
should combine this somehow in one write() call...

-- 
Met vriendelijke groet / with kind regards,
    Guus Sliepen <guus at sliepen.eu.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://brouwer.uvt.nl/pipermail/tinc-devel/attachments/20060113/208359d7/attachment.pgp


More information about the tinc-devel mailing list