QBONE QUIC version retry: break on region redirect. For legacy reasons, we try QUIC version RFCv1 many times before falling back to draft29. This is to try to drive down the # of clients using draft29, which is supposed to be deprecated. The current code, however, runs through all QUIC versions even when a redirect occurs, which is a bit silly because a successful redirect response actually indicates the QUIC version is good. We should immediately fail the current connection attempt so that the host can be re-resolved to the redirected region. Implementation changes: - Added `REDIRECT` to `QboneTunnelInterface::State` enum. - Updated `QboneTunnel::HandleIpRangeAssignment` to return `REDIRECT` when a region redirect response is received. - Updated `QboneTunnel::WaitForEventsUntilState` to handle `REDIRECT` as a failure state. - Updated `QboneTunnel::ConnectIfNeeded` to break out of the QUIC version loop if the connection failed due to `REDIRECT`. - Added integration test `OutOfRegionClientHandlesRegionFqdnRedirectWithMultipleVersions` to verify that the version loop is broken on redirect and only one connection attempt is made to the original host. PiperOrigin-RevId: 959194912
diff --git a/quiche/quic/qbone/bonnet/qbone_tunnel_interface.h b/quiche/quic/qbone/bonnet/qbone_tunnel_interface.h index 6f67b79..07ffaa0 100644 --- a/quiche/quic/qbone/bonnet/qbone_tunnel_interface.h +++ b/quiche/quic/qbone/bonnet/qbone_tunnel_interface.h
@@ -33,6 +33,7 @@ END_REQUESTED, ENDED, FAILED, + REDIRECT, }; // Wait and handle any events which occur. @@ -75,6 +76,8 @@ return "ENDED"; case FAILED: return "FAILED"; + case REDIRECT: + return "REDIRECT"; default: return "UNKNOWN"; }