f8e159d658
Formulas described in RFC require high precision of floating point. Formulas of integer math implemented in ng_pptpgre give mistake in range of +0-7ms on RTT and +0-3ms on deviation. This leads to significant underestimation of real packet RTT. I have made a very simple patch to reduce mistake to +4-3ms on RTT and +2-1ms on deviation. Mistake in RTT is not good, but gets covered by deviation. To cover worst possible negative mistake in deviation I have added 2ms to it. Also this 2 ms cover the case when measured deviation is so small (about zero) that it can interfere with process scheduling delays or weather on Mars. My tests show decreasing of packet losses on 20ms RTT link from 2.5% to 0.3% while speed increased un 1/3. Reviewed by: archie