quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

Check QUIC Bit that Short Header Packet set too #1404

Closed thekuwayama closed 2 years ago

thekuwayama commented 2 years ago

Hi! This PR would allow Connection to check Short Header Packets greasing QUIC Bit.

PlainHeader::decode() can check Long Header Packets with the QUIC Bit set to a value of 0. If EndpointConfig is not set grease_quic_bit with false, it raise PacketDecodeError::InvalidHeader("fixed bit unset"). But, in my understanding, Short Header Packets should be checked QUIC Bit too.

Thanks.