case NGX_QUIC_TP_STATELESS_RESET_TOKEN:
case NGX_QUIC_TP_PREFERRED_ADDRESS:
// TODO
- return NGX_ERROR;
+ return NGX_DECLINED;
}
switch (id) {
break;
default:
- return NGX_ERROR;
+ return NGX_DECLINED;
}
switch (id) {
ngx_quic_parse_transport_params(u_char *p, u_char *end, ngx_quic_tp_t *tp,
ngx_log_t *log)
{
+ ngx_int_t rc;
#if (quic_version < 0xff00001b)
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,
"failed to parse transport param id 0x%xi data", id);
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;
};
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,
"failed to parse transport param id 0x%xi data", id);
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;
}