disable check for diversification nonce public flag bit

see #232
This commit is contained in:
Marten Seemann
2016-07-31 16:15:51 +07:00
committed by Lucas Clemente
parent 5ec7ee7f01
commit 956bfa2d5a
2 changed files with 6 additions and 4 deletions

View File

@@ -107,9 +107,11 @@ func ParsePublicHeader(b io.ByteReader) (*PublicHeader, error) {
header.VersionFlag = publicFlagByte&0x01 > 0
header.ResetFlag = publicFlagByte&0x02 > 0
if publicFlagByte&0x04 > 0 {
return nil, errors.New("diversification nonces should only be sent by servers")
}
// TODO: activate this check once Chrome sends the correct value
// see https://github.com/lucas-clemente/quic-go/issues/232
// if publicFlagByte&0x04 > 0 {
// return nil, errors.New("diversification nonces should only be sent by servers")
// }
if publicFlagByte&0x08 == 0 {
return nil, errReceivedTruncatedConnectionID