mirror of
https://github.com/nginx/nginx.git
synced 2025-07-25 22:56:59 +08:00
QUIC: refactored ngx_quic_validate_path().
The function now accepts path argument, as suggested by the name. Socket is not really needed inside.
This commit is contained in:
parent
93230cd8cf
commit
cb273ddf91
@ -13,7 +13,7 @@
|
|||||||
static void ngx_quic_set_connection_path(ngx_connection_t *c,
|
static void ngx_quic_set_connection_path(ngx_connection_t *c,
|
||||||
ngx_quic_path_t *path);
|
ngx_quic_path_t *path);
|
||||||
static ngx_int_t ngx_quic_validate_path(ngx_connection_t *c,
|
static ngx_int_t ngx_quic_validate_path(ngx_connection_t *c,
|
||||||
ngx_quic_socket_t *qsock);
|
ngx_quic_path_t *path);
|
||||||
static ngx_int_t ngx_quic_send_path_challenge(ngx_connection_t *c,
|
static ngx_int_t ngx_quic_send_path_challenge(ngx_connection_t *c,
|
||||||
ngx_quic_path_t *path);
|
ngx_quic_path_t *path);
|
||||||
static ngx_int_t ngx_quic_path_restore(ngx_connection_t *c);
|
static ngx_int_t ngx_quic_path_restore(ngx_connection_t *c);
|
||||||
@ -422,7 +422,7 @@ ngx_quic_handle_migration(ngx_connection_t *c, ngx_quic_header_t *pkt)
|
|||||||
ngx_quic_path_state_str(next));
|
ngx_quic_path_state_str(next));
|
||||||
|
|
||||||
if (next->state == NGX_QUIC_PATH_NEW) {
|
if (next->state == NGX_QUIC_PATH_NEW) {
|
||||||
if (ngx_quic_validate_path(c, qsock) != NGX_OK) {
|
if (ngx_quic_validate_path(c, qsock->path) != NGX_OK) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -478,17 +478,14 @@ ngx_quic_handle_migration(ngx_connection_t *c, ngx_quic_header_t *pkt)
|
|||||||
|
|
||||||
|
|
||||||
static ngx_int_t
|
static ngx_int_t
|
||||||
ngx_quic_validate_path(ngx_connection_t *c, ngx_quic_socket_t *qsock)
|
ngx_quic_validate_path(ngx_connection_t *c, ngx_quic_path_t *path)
|
||||||
{
|
{
|
||||||
ngx_msec_t pto;
|
ngx_msec_t pto;
|
||||||
ngx_quic_path_t *path;
|
|
||||||
ngx_quic_send_ctx_t *ctx;
|
ngx_quic_send_ctx_t *ctx;
|
||||||
ngx_quic_connection_t *qc;
|
ngx_quic_connection_t *qc;
|
||||||
|
|
||||||
qc = ngx_quic_get_connection(c);
|
qc = ngx_quic_get_connection(c);
|
||||||
|
|
||||||
path = qsock->path;
|
|
||||||
|
|
||||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||||
"quic initiated validation of new path #%uL",
|
"quic initiated validation of new path #%uL",
|
||||||
path->seqnum);
|
path->seqnum);
|
||||||
|
Loading…
Reference in New Issue
Block a user