uint64_t mtu_pnum[NGX_QUIC_PATH_RETRIES];
ngx_str_t addr_text;
u_char text[NGX_SOCKADDR_STRLEN];
- ngx_uint_t validated; /* unsigned validated:1; */
+ unsigned validated:1;
+ unsigned mtu_unvalidated:1;
};
path->mtu = prev->mtu;
path->max_mtu = prev->max_mtu;
+ path->mtu_unvalidated = 0;
}
}
qc->congestion.recovery_start = ngx_current_msec;
}
+ path->validated = 1;
+
+ if (path->mtu_unvalidated) {
+ path->mtu_unvalidated = 0;
+ return ngx_quic_validate_path(c, path);
+ }
+
/*
* RFC 9000, 9.3. Responding to Connection Migration
*
ngx_quic_path_dbg(c, "is validated", path);
- path->validated = 1;
-
ngx_quic_discover_path_mtu(c, path);
return NGX_OK;
* sending a datagram of this size.
*/
- min = (ngx_quic_path_limit(c, path, 1200) < 1200) ? 0 : 1200;
+ if (path->mtu_unvalidated
+ || ngx_quic_path_limit(c, path, 1200) < 1200)
+ {
+ min = 0;
+ path->mtu_unvalidated = 1;
+
+ } else {
+ min = 1200;
+ }
if (ngx_quic_frame_sendto(c, frame, min, path) == NGX_ERROR) {
return NGX_ERROR;