mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Skip unknown transport parameters.
This commit is contained in:
parent
6a3a0ee19f
commit
b3129b46f6
@ -1227,7 +1227,7 @@ ngx_quic_parse_transport_param(u_char *p, u_char *end, uint16_t id,
|
|||||||
case NGX_QUIC_TP_STATELESS_RESET_TOKEN:
|
case NGX_QUIC_TP_STATELESS_RESET_TOKEN:
|
||||||
case NGX_QUIC_TP_PREFERRED_ADDRESS:
|
case NGX_QUIC_TP_PREFERRED_ADDRESS:
|
||||||
// TODO
|
// TODO
|
||||||
return NGX_ERROR;
|
return NGX_DECLINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
@ -1259,7 +1259,7 @@ ngx_quic_parse_transport_param(u_char *p, u_char *end, uint16_t id,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return NGX_ERROR;
|
return NGX_DECLINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
@ -1320,6 +1320,7 @@ ngx_int_t
|
|||||||
ngx_quic_parse_transport_params(u_char *p, u_char *end, ngx_quic_tp_t *tp,
|
ngx_quic_parse_transport_params(u_char *p, u_char *end, ngx_quic_tp_t *tp,
|
||||||
ngx_log_t *log)
|
ngx_log_t *log)
|
||||||
{
|
{
|
||||||
|
ngx_int_t rc;
|
||||||
|
|
||||||
#if (quic_version < 0xff00001b)
|
#if (quic_version < 0xff00001b)
|
||||||
|
|
||||||
@ -1348,12 +1349,19 @@ ngx_quic_parse_transport_params(u_char *p, u_char *end, ngx_quic_tp_t *tp,
|
|||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_quic_parse_transport_param(p, p + len, id, tp) != NGX_OK) {
|
rc = ngx_quic_parse_transport_param(p, p + len, id, tp);
|
||||||
|
|
||||||
|
if (rc == NGX_ERROR) {
|
||||||
ngx_log_error(NGX_LOG_INFO, log, 0,
|
ngx_log_error(NGX_LOG_INFO, log, 0,
|
||||||
"failed to parse transport param id 0x%xi data", id);
|
"failed to parse transport param id 0x%xi data", id);
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rc == NGX_DECLINED) {
|
||||||
|
ngx_log_error(NGX_LOG_INFO, log, 0,
|
||||||
|
"unknown transport param id 0x%xi, skipped", id);
|
||||||
|
}
|
||||||
|
|
||||||
p += len;
|
p += len;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1376,12 +1384,19 @@ ngx_quic_parse_transport_params(u_char *p, u_char *end, ngx_quic_tp_t *tp,
|
|||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_quic_parse_transport_param(p, p + len, id, tp) != NGX_OK) {
|
rc = ngx_quic_parse_transport_param(p, p + len, id, tp);
|
||||||
|
|
||||||
|
if (rc == NGX_ERROR) {
|
||||||
ngx_log_error(NGX_LOG_INFO, log, 0,
|
ngx_log_error(NGX_LOG_INFO, log, 0,
|
||||||
"failed to parse transport param id 0x%xi data", id);
|
"failed to parse transport param id 0x%xi data", id);
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rc == NGX_DECLINED) {
|
||||||
|
ngx_log_error(NGX_LOG_INFO, log, 0,
|
||||||
|
"unknown transport param id 0x%xi,skipped", id);
|
||||||
|
}
|
||||||
|
|
||||||
p += len;
|
p += len;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user