comparison src/event/ngx_event_quic_transport.h @ 7863:81f85c479d7e quic

Discard packets without fixed bit or reserved bits set. Section 17.2 and 17.3 of QUIC transport: Fixed bit: Packets containing a zero value for this bit are not valid packets in this version and MUST be discarded. Reserved bit: An endpoint MUST treat receipt of a packet that has a non-zero value for these bits, after removing both packet and header protection, as a connection error of type PROTOCOL_VIOLATION.
author Vladimir Homutov <vl@nginx.com>
date Thu, 14 May 2020 01:06:45 +0300
parents fb7422074258
children eebdda507ec3
comparison
equal deleted inserted replaced
7862:fb7422074258 7863:81f85c479d7e
16 16
17 #define NGX_QUIC_PKT_LONG 0x80 /* header form */ 17 #define NGX_QUIC_PKT_LONG 0x80 /* header form */
18 #define NGX_QUIC_PKT_FIXED_BIT 0x40 18 #define NGX_QUIC_PKT_FIXED_BIT 0x40
19 #define NGX_QUIC_PKT_TYPE 0x30 /* in long packet */ 19 #define NGX_QUIC_PKT_TYPE 0x30 /* in long packet */
20 #define NGX_QUIC_PKT_KPHASE 0x04 /* in short packet */ 20 #define NGX_QUIC_PKT_KPHASE 0x04 /* in short packet */
21
22 #define NGX_QUIC_PKT_LONG_RESERVED_BIT 0x0C
23 #define NGX_QUIC_PKT_SHORT_RESERVED_BIT 0x18
21 24
22 #define ngx_quic_long_pkt(flags) ((flags) & NGX_QUIC_PKT_LONG) 25 #define ngx_quic_long_pkt(flags) ((flags) & NGX_QUIC_PKT_LONG)
23 #define ngx_quic_short_pkt(flags) (((flags) & NGX_QUIC_PKT_LONG) == 0) 26 #define ngx_quic_short_pkt(flags) (((flags) & NGX_QUIC_PKT_LONG) == 0)
24 27
25 /* Long packet types */ 28 /* Long packet types */