Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic_transport.c @ 7909:49a98760afd2 quic
Rejected forbidden transport parameters with TRANSPORT_PARAMETER_ERROR.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 29 May 2020 12:55:39 +0300 |
parents | 2d5db7faa788 |
children | 125cbfa77013 |
comparison
equal
deleted
inserted
replaced
7908:f27fdf86275d | 7909:49a98760afd2 |
---|---|
1354 ngx_quic_tp_t *dst) | 1354 ngx_quic_tp_t *dst) |
1355 { | 1355 { |
1356 uint64_t varint; | 1356 uint64_t varint; |
1357 | 1357 |
1358 switch (id) { | 1358 switch (id) { |
1359 case NGX_QUIC_TP_ORIGINAL_CONNECTION_ID: | |
1360 case NGX_QUIC_TP_STATELESS_RESET_TOKEN: | |
1361 case NGX_QUIC_TP_PREFERRED_ADDRESS: | |
1362 /* TODO: implement */ | |
1363 return NGX_DECLINED; | |
1364 } | |
1365 | |
1366 switch (id) { | |
1367 | 1359 |
1368 case NGX_QUIC_TP_DISABLE_ACTIVE_MIGRATION: | 1360 case NGX_QUIC_TP_DISABLE_ACTIVE_MIGRATION: |
1369 /* zero-length option */ | 1361 /* zero-length option */ |
1370 if (end - p != 0) { | 1362 if (end - p != 0) { |
1371 return NGX_ERROR; | 1363 return NGX_ERROR; |
1462 ngx_log_error(NGX_LOG_INFO, log, 0, | 1454 ngx_log_error(NGX_LOG_INFO, log, 0, |
1463 "quic failed to parse transport param id"); | 1455 "quic failed to parse transport param id"); |
1464 return NGX_ERROR; | 1456 return NGX_ERROR; |
1465 } | 1457 } |
1466 | 1458 |
1459 switch (id) { | |
1460 case NGX_QUIC_TP_ORIGINAL_CONNECTION_ID: | |
1461 case NGX_QUIC_TP_PREFERRED_ADDRESS: | |
1462 case NGX_QUIC_TP_STATELESS_RESET_TOKEN: | |
1463 ngx_log_error(NGX_LOG_INFO, log, 0, | |
1464 "quic client sent forbidden transport param" | |
1465 " id 0x%xi", id); | |
1466 return NGX_ERROR; | |
1467 } | |
1468 | |
1467 p = ngx_quic_parse_int(p, end, &len); | 1469 p = ngx_quic_parse_int(p, end, &len); |
1468 if (p == NULL) { | 1470 if (p == NULL) { |
1469 ngx_log_error(NGX_LOG_INFO, log, 0, | 1471 ngx_log_error(NGX_LOG_INFO, log, 0, |
1470 "quic failed to parse" | 1472 "quic failed to parse" |
1471 " transport param id 0x%xi length", id); | 1473 " transport param id 0x%xi length", id); |