correcty read PublicHeader of PublicReset packets

This commit is contained in:
Marten Seemann
2016-11-07 21:26:25 +07:00
parent afa71d52f1
commit 56a287ab9c
6 changed files with 89 additions and 65 deletions

View File

@@ -126,7 +126,7 @@ func (p *UDPProxy) runProxy() error {
raw := buffer[0:n]
r := bytes.NewReader(raw)
hdr, err := quic.ParsePublicHeader(r)
hdr, err := quic.ParsePublicHeader(r, protocol.PerspectiveClient)
if err != nil {
return err
}
@@ -154,7 +154,7 @@ func (p *UDPProxy) runConnection(conn *connection) error {
// TODO: Switch back to using the public header once Chrome properly sets the type byte.
// r := bytes.NewReader(raw)
// , err := quic.ParsePublicHeader(r)
// , err := quic.ParsePublicHeader(r, protocol.PerspectiveServer)
// if err != nil {
// return err
// }