On 2015/06/17 03:03, Sergey Ryazanov wrote: > Hello Stuart, > > xl2tpd could not correctly handle fragmented ppp frame while read it > from pty if one of consequent read operation return an error. > That's happening because xl2tpd too often cleans the buffer and > assumes that each read frame operation is performed for new frame, > since xl2tpd uses single buffer for pty and for socket read operations. > > The attached patch moves all pty related buffers into _call_ context > and corrects calculation of buffer position, what fixes issue with > handling of fragmented frames. Now we can use MTU > 1000. I tested > these changes with load (L2TP tunnel without IPSec) and all seems work > normally. No more "Protocol-Reject" frames. > > I attach two patches: > xl2tpd-1.3.1-fix-ppp-fragmentation.patch - against xl2tpd-1.3.1 > sources, implements fix > ports-net-xl2tpd-fix-ppp-fragmentation.patch - integrates patch to > ports tree and also corrects README: enlarge MTU/MRU values in > example config and remove note about fragmented frames issues. > > Anyway, even with this change and MTU ~ 1400, overall performance is > nasty: only 2 mbps of upload rate on my 3GHz Intel CPU. > > -- > Sergey
Many thanks Sergey, the performance is definitely not great (though isn't CPU-bound at all) but xl2tpd is vastly more useful on OpenBSD with this diff. I've committed it.