-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong data size when reading from TUN device\wrong size of data buffers #26
Comments
Hi, thank you very much for the bug report. I'll look into it as soon as possible to fix this. I noticed yesterday you're working in the same area. Maybe we can share our results, I think this would be interresting :-) ps: my english is bad too :-) |
Yeah vtrunkd is also great project but i don't really like how its "done" - btw also i have found 1 more bug - if REORDER_MAX_SEQ sets low and in fprintf("[reorder] buffer size can't be more t.... ....very strange, i think somewhere in reorder code there is problem with 2013/1/4 Laurent Coustet notifications@github.com
|
Yeah ok. MLVPN was designer for "high speed" lowjitter like ADSL,SDSL as a first goal. I tried working for 3G/slowspeed/unstable connections with the reorder branch, but without success. There are probably many mistakes on the reorder branch. It was just an unstable experiment. If you need help debugging or understanding the think, don't hesitate, I'll write as much documentation as needed. For example, keep in mind MLVPN is using privsep, and the first process launched is the privileged one. |
There is a system to dynamically change most parameters (speed included) by modifying the configuration, and reloading mlvpn (SIGHUP). It is planned to add this feature through the control socket (control.c). Should be trivial to do. |
I have tried reorder branch with last fixes from master branch and fix for For 3g and unstable connections retransmission of lost packets, reordering 2013/1/4 Laurent Coustet notifications@github.com
|
Sorry for the delay, still have not checked this.. Will try tonight |
I've checked the code and I don't think there is anything wrong. As I am using IF_NO_PI I should never have more than standard 1500 bytes MTU of data. Let me know if I'm wrong |
Hello! I have found small bug in code - when reading from TUN you need to add 4 bytes ip overhead (because when client for example send 1500 bytes packet, thats means that tun will add its 4 bytes IP header and real data size will be 1504 bytes).
so pktdata_t data size has to be (DEFAULT_MTU + 4) and when you reading from TUN
read(tuntap->fd, pkt->pktdata.data, (DEFAULT_MTU + 4));
or data will be corrupted.
don't know how much TAP is adding tho...
sorry for my bad english
ps thanks for this great project!
The text was updated successfully, but these errors were encountered: