When receiving a ClientHello for a 0-RTT connection, this allows us to derive both 0-RTT and Handshake keys at the same time. The previous logic used to inadvertently discard previously undecryptable packets (e.g. reordered 0-RTT packets).
* remove unused bool return value from sentPacketHandler.getPTOTimeAndSpace
* ackhandler: implement timer logic for path probing packets
Path probe packets are treated differently from regular packets: The new
path might have a vastly different RTT than the original path.
Path probe packets are declared lost 1s after they are sent. This value
can be reduced, once implement proper retransmission logic for lost path
probes.
* ackhandler: declare path probes lost on OnLossDetectionTimeout
Reduces memory usage by replacing a fixed-capacity channel (256) with a
ring buffer (initial capacity: 8). The buffer grows to 256 only when
many packets are enqueued.
* Change init to sync.Once to handle fips-only setup.
* review.
* use the mutex instead of the sync.Once
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* add Prometheus metrics for sent long and short header packets
* add Prometheus metrics for received long and short header packets
* add Grafana panels for sent and received packets
* fix memory leak on connection ID rotation during CONNECTION_CLOSE
In rare instances, the connection ID manager might switch to a new
connection ID when sending the packet containing the CONNECTION_CLOSE
frame. The connection ID manager removes the active stateless reset
token from the packet handler map when it is closed, so we need to make
sure that this happens last, otherwise the packet handler will keep a
pointer to the closed connection indefinitely.
* defer
* panic on use of connIDManager after Close
* preserve error from cancelled SendStream during cancellation and closing
* clarify that canceling a send stream after closing is valid
* preserve close and reset error when send stream is closed for shutdown
* wire: implement frame classification into probing / non-probing
* wire: consolidate files
* check if frame is ack eliciting and path probing in frames fuzz test
The packet number generator for the application data packet number
space randomly skips packet numbers. We need to be careful to not
acknowledge a skipped packet when acknowledging a range of packets in
the sent packet handler tests.