Latest update - 9079
This commit is contained in:
@@ -482,6 +482,7 @@ ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc)
|
|||||||
|
|
||||||
/* drop packets from retransmit queues, no ack is expected */
|
/* drop packets from retransmit queues, no ack is expected */
|
||||||
for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) {
|
for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) {
|
||||||
|
ngx_quic_free_frames(c, &qc->send_ctx[i].frames);
|
||||||
ngx_quic_free_frames(c, &qc->send_ctx[i].sent);
|
ngx_quic_free_frames(c, &qc->send_ctx[i].sent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ ngx_int_t
|
|||||||
ngx_quic_split_frame(ngx_connection_t *c, ngx_quic_frame_t *f, size_t len)
|
ngx_quic_split_frame(ngx_connection_t *c, ngx_quic_frame_t *f, size_t len)
|
||||||
{
|
{
|
||||||
size_t shrink;
|
size_t shrink;
|
||||||
|
ngx_chain_t *out;
|
||||||
ngx_quic_frame_t *nf;
|
ngx_quic_frame_t *nf;
|
||||||
ngx_quic_buffer_t qb;
|
ngx_quic_buffer_t qb;
|
||||||
ngx_quic_ordered_frame_t *of, *onf;
|
ngx_quic_ordered_frame_t *of, *onf;
|
||||||
@@ -359,11 +360,13 @@ ngx_quic_split_frame(ngx_connection_t *c, ngx_quic_frame_t *f, size_t len)
|
|||||||
ngx_memzero(&qb, sizeof(ngx_quic_buffer_t));
|
ngx_memzero(&qb, sizeof(ngx_quic_buffer_t));
|
||||||
qb.chain = f->data;
|
qb.chain = f->data;
|
||||||
|
|
||||||
f->data = ngx_quic_read_buffer(c, &qb, of->length);
|
out = ngx_quic_read_buffer(c, &qb, of->length);
|
||||||
if (f->data == NGX_CHAIN_ERROR) {
|
if (out == NGX_CHAIN_ERROR) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f->data = out;
|
||||||
|
|
||||||
nf = ngx_quic_alloc_frame(c);
|
nf = ngx_quic_alloc_frame(c);
|
||||||
if (nf == NULL) {
|
if (nf == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
|
|||||||
@@ -882,7 +882,7 @@ ngx_quic_send_stateless_reset(ngx_connection_t *c, ngx_quic_conf_t *conf,
|
|||||||
ngx_int_t
|
ngx_int_t
|
||||||
ngx_quic_send_cc(ngx_connection_t *c)
|
ngx_quic_send_cc(ngx_connection_t *c)
|
||||||
{
|
{
|
||||||
ngx_quic_frame_t *frame;
|
ngx_quic_frame_t frame;
|
||||||
ngx_quic_connection_t *qc;
|
ngx_quic_connection_t *qc;
|
||||||
|
|
||||||
qc = ngx_quic_get_connection(c);
|
qc = ngx_quic_get_connection(c);
|
||||||
@@ -898,27 +898,22 @@ ngx_quic_send_cc(ngx_connection_t *c)
|
|||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame = ngx_quic_alloc_frame(c);
|
ngx_memzero(&frame, sizeof(ngx_quic_frame_t));
|
||||||
if (frame == NULL) {
|
|
||||||
return NGX_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
frame->level = qc->error_level;
|
frame.level = qc->error_level;
|
||||||
frame->type = qc->error_app ? NGX_QUIC_FT_CONNECTION_CLOSE_APP
|
frame.type = qc->error_app ? NGX_QUIC_FT_CONNECTION_CLOSE_APP
|
||||||
: NGX_QUIC_FT_CONNECTION_CLOSE;
|
: NGX_QUIC_FT_CONNECTION_CLOSE;
|
||||||
frame->u.close.error_code = qc->error;
|
frame.u.close.error_code = qc->error;
|
||||||
frame->u.close.frame_type = qc->error_ftype;
|
frame.u.close.frame_type = qc->error_ftype;
|
||||||
|
|
||||||
if (qc->error_reason) {
|
if (qc->error_reason) {
|
||||||
frame->u.close.reason.len = ngx_strlen(qc->error_reason);
|
frame.u.close.reason.len = ngx_strlen(qc->error_reason);
|
||||||
frame->u.close.reason.data = (u_char *) qc->error_reason;
|
frame.u.close.reason.data = (u_char *) qc->error_reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_quic_queue_frame(qc, frame);
|
|
||||||
|
|
||||||
qc->last_cc = ngx_current_msec;
|
qc->last_cc = ngx_current_msec;
|
||||||
|
|
||||||
return ngx_quic_output(c);
|
return ngx_quic_frame_sendto(c, &frame, 0, qc->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1228,7 +1223,7 @@ ngx_quic_frame_sendto(ngx_connection_t *c, ngx_quic_frame_t *frame,
|
|||||||
static u_char dst[NGX_QUIC_MAX_UDP_PAYLOAD_SIZE];
|
static u_char dst[NGX_QUIC_MAX_UDP_PAYLOAD_SIZE];
|
||||||
|
|
||||||
qc = ngx_quic_get_connection(c);
|
qc = ngx_quic_get_connection(c);
|
||||||
ctx = ngx_quic_get_send_ctx(qc, ssl_encryption_application);
|
ctx = ngx_quic_get_send_ctx(qc, frame->level);
|
||||||
|
|
||||||
ngx_quic_init_packet(c, ctx, &pkt, path);
|
ngx_quic_init_packet(c, ctx, &pkt, path);
|
||||||
|
|
||||||
|
|||||||
@@ -59,9 +59,6 @@ ngx_http_v3_init_session(ngx_connection_t *c)
|
|||||||
failed:
|
failed:
|
||||||
|
|
||||||
ngx_log_error(NGX_LOG_ERR, c->log, 0, "failed to create http3 session");
|
ngx_log_error(NGX_LOG_ERR, c->log, 0, "failed to create http3 session");
|
||||||
|
|
||||||
ngx_http_v3_finalize_connection(c, NGX_HTTP_V3_ERR_INTERNAL_ERROR,
|
|
||||||
"failed to create http3 session");
|
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user