Mercurial > hg > nginx
comparison src/event/ngx_event_quic.c @ 8380:efe1f104caf7 quic
Removed redundant long packet type checks.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Sat, 09 May 2020 17:41:07 +0300 |
parents | aecd8ec29c8e |
children | 6e100d8c138a |
comparison
equal
deleted
inserted
replaced
8379:aecd8ec29c8e | 8380:efe1f104caf7 |
---|---|
1163 | 1163 |
1164 if (ngx_quic_check_peer(qc, pkt) != NGX_OK) { | 1164 if (ngx_quic_check_peer(qc, pkt) != NGX_OK) { |
1165 return NGX_ERROR; | 1165 return NGX_ERROR; |
1166 } | 1166 } |
1167 | 1167 |
1168 if (!ngx_quic_pkt_hs(pkt->flags)) { | |
1169 ngx_log_error(NGX_LOG_INFO, c->log, 0, | |
1170 "quic invalid packet type: 0x%xi", pkt->flags); | |
1171 return NGX_ERROR; | |
1172 } | |
1173 | |
1174 if (ngx_quic_parse_handshake_header(pkt) != NGX_OK) { | 1168 if (ngx_quic_parse_handshake_header(pkt) != NGX_OK) { |
1175 return NGX_ERROR; | 1169 return NGX_ERROR; |
1176 } | 1170 } |
1177 | 1171 |
1178 pkt->secret = &keys->client; | 1172 pkt->secret = &keys->client; |
1205 if (ngx_quic_parse_long_header(pkt) != NGX_OK) { | 1199 if (ngx_quic_parse_long_header(pkt) != NGX_OK) { |
1206 return NGX_ERROR; | 1200 return NGX_ERROR; |
1207 } | 1201 } |
1208 | 1202 |
1209 if (ngx_quic_check_peer(qc, pkt) != NGX_OK) { | 1203 if (ngx_quic_check_peer(qc, pkt) != NGX_OK) { |
1210 return NGX_ERROR; | |
1211 } | |
1212 | |
1213 if (!ngx_quic_pkt_zrtt(pkt->flags)) { | |
1214 ngx_log_error(NGX_LOG_INFO, c->log, 0, | |
1215 "quic invalid packet type: 0x%xi", pkt->flags); | |
1216 return NGX_ERROR; | 1204 return NGX_ERROR; |
1217 } | 1205 } |
1218 | 1206 |
1219 if (ngx_quic_parse_handshake_header(pkt) != NGX_OK) { | 1207 if (ngx_quic_parse_handshake_header(pkt) != NGX_OK) { |
1220 return NGX_ERROR; | 1208 return NGX_ERROR; |