A client that selected a zero-length connection id during the handshake
cannot issue new connection ids, and a zero-length Destination
Connection ID field is used in all packets sent toward such an endpoint
over any network path, see RFC 9000, 5.1.1. Instead, a new path was
required to have its own client id, so every packet from a new client
address was dropped with "no available client ids for new path" until
the idle timeout. This affected clients using zero-length connection
ids, such as Chrome, OpenSSL and msquic, on any change of address or
port, including NAT rebinding.
Now the zero-length client id is used on any path and is never retired,
since RETIRE_CONNECTION_ID cannot be sent for it, see RFC 9000, 19.16.
The problem appeared in
c4f5b50c4 (1.25.0).
{
cid = ngx_queue_data(q, ngx_quic_client_id_t, queue);
- if (!cid->used) {
+ if (!cid->used || cid->len == 0) {
+ /* a zero-length client id is used on all paths */
return cid;
}
}
/*
* invalidate CID that is no longer usable for any other path;
- * this also requests new CIDs from client
+ * this also requests new CIDs from client;
+ * a zero-length CID is used on all paths and cannot be retired
*/
- if (path->cid) {
+ if (path->cid && path->cid->len) {
if (ngx_quic_free_client_id(c, path->cid) != NGX_OK) {
return NGX_ERROR;
}