rename the packet types according to recent draft changes

This commit is contained in:
Marten Seemann
2017-11-01 10:15:03 +07:00
parent 49e305f97f
commit 3e6f66da79
5 changed files with 16 additions and 18 deletions

View File

@@ -279,7 +279,7 @@ func (s *server) handlePacket(pconn net.PacketConn, remoteAddr net.Addr, packet
}
}
// send an IETF draft style Version Negotiation Packet, if the client sent an unsupported version with an IETF draft style header
if hdr.Type == protocol.PacketTypeClientInitial && !protocol.IsSupportedVersion(s.config.Versions, hdr.Version) {
if hdr.Type == protocol.PacketTypeInitial && !protocol.IsSupportedVersion(s.config.Versions, hdr.Version) {
_, err := pconn.WriteTo(wire.ComposeVersionNegotiation(hdr.ConnectionID, hdr.PacketNumber, s.config.Versions), remoteAddr)
return err
}