mirror of https://github.com/ospab/ostp.git
- Karn's algorithm: drop_acked_frames no longer samples RTT from frames that were retransmitted (last_sent is bumped on each retransmit, so an ACK for the original transmission would measure a spuriously small RTT and drag SRTT/RTO down). Added CongestionController::on_ack_no_rtt for the case where every acked frame was ambiguous, so the window still advances without polluting the RTT estimator. Refactored the shared window-growth into grow_window. - Frame decode: header+payload+pad length now uses checked_add. payload_len is a u32 from the header and on 32-bit targets (MIPS/ARMv7 routers are supported) the sum could wrap usize and slip past the truncation check. - Replay cache: a full cache used to reject ALL new handshakes globally until the next tick, letting one flooding key-holder deny service to everyone. Now it reclaims expired entries and, if still full, evicts the single oldest — new handshakes always get in. Fixed the mislabelled "100000" log (cap is 50000) and named it REPLAY_CACHE_MAX. |
||
|---|---|---|
| .. | ||
| crypto | ||
| framing | ||
| congestion.rs | ||
| lib.rs | ||
| protocol.rs | ||
| relay.rs | ||