boringtun
boringtun copied to clipboard
Make queue size configurable & drop oldest packets first
This PR contains three commits:
- Make the queue size configurable. In my program, the server sometime starts on-demand, and the client buffers a significant number of packets by default, which causes a bit of flooding
- Replaces a conditional with an assertion. I'd happily revert if this desired by maintainers. This code would probably be a bit more readable if
dequeue_packetandrequeue_packetwere inlined into their callsite, which I'd also happily contribute - Drop oldest packets first. I believe this is reasonable (think TCP retransmits), but I'd be happy to keep the current behaviour if wanted
Side-note: Is there a way to run only tests that don't required sudo?