implement parsing of headers with different connection ID lengths

This commit is contained in:
Marten Seemann 2018-07-01 12:15:15 +07:00
parent b26eb2705f
commit 0bd7e744ff
16 changed files with 97 additions and 90 deletions

View file

@ -364,7 +364,7 @@ func (c *client) handleRead(remoteAddr net.Addr, packet []byte) {
rcvTime := time.Now()
r := bytes.NewReader(packet)
iHdr, err := wire.ParseInvariantHeader(r)
iHdr, err := wire.ParseInvariantHeader(r, protocol.ConnectionIDLenGQUIC)
// drop the packet if we can't parse the header
if err != nil {
c.logger.Errorf("error parsing invariant header: %s", err)