cloudflared-mirror/quic/v3
Devin Carr 41dffd7f3c CUSTESC-53681: Correct QUIC connection management for datagram handlers
Corrects the pattern of using errgroup's and context cancellation to simplify the logic for canceling extra routines for the QUIC connection. This is because the extra context cancellation is redundant with the fact that the errgroup also cancels it's own provided context when a routine returns (error or not).

For the datagram handler specifically, since it can respond faster to a context cancellation from the QUIC connection, we wrap the error before surfacing it outside of the QUIC connection scope to the supervisor. Additionally, the supervisor will look for this error type to check if it should retry the QUIC connection. These two operations are required because the supervisor does not look for a context canceled error when deciding to retry a connection. If a context canceled from the datagram handler were to be returned up to the supervisor on the initial connection, the cloudflared application would exit. We want to ensure that cloudflared maintains connection attempts even if any of the services on-top of a QUIC connection fail (datagram handler in this case).

Additional logging is also introduced along these paths to help with understanding the error conditions from the specific handlers on-top of a QUIC connection.

Related CUSTESC-53681

Closes TUN-9610
2025-08-19 16:10:00 -07:00
..
datagram.go TUN-8861: Rename Session Limiter to Flow Limiter 2025-01-20 06:33:40 -08:00
datagram_errors.go TUN-8640: Add ICMP support for datagram V3 2024-12-09 07:23:11 -08:00
datagram_test.go TUN-8640: Add ICMP support for datagram V3 2024-12-09 07:23:11 -08:00
icmp.go TUN-8640: Add ICMP support for datagram V3 2024-12-09 07:23:11 -08:00
icmp_test.go TUN-8640: Add ICMP support for datagram V3 2024-12-09 07:23:11 -08:00
manager.go TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00
manager_test.go TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00
metrics.go TUN-9319: Add dynamic loading of features to connections via ConnectionOptionsSnapshot 2025-05-14 20:11:05 +00:00
metrics_test.go TUN-9322: Add metric for unsupported RPC commands for datagram v3 2025-05-13 16:11:09 +00:00
muxer.go CUSTESC-53681: Correct QUIC connection management for datagram handlers 2025-08-19 16:10:00 -07:00
muxer_test.go TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00
request.go TUN-8641: Expose methods to simplify V3 Datagram parsing on the edge 2024-11-04 15:23:36 -08:00
request_test.go TUN-8641: Expose methods to simplify V3 Datagram parsing on the edge 2024-11-04 15:23:36 -08:00
session.go TUN-9322: Add metric for unsupported RPC commands for datagram v3 2025-05-13 16:11:09 +00:00
session_fuzz_test.go TUN-8667: Add datagram v3 session manager 2024-10-31 14:05:15 -07:00
session_test.go TUN-9016: update go to 1.24 2025-06-06 09:05:49 +00:00