mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-05 21:27:35 +03:00
don't explicitely pass the header binary to the unpacker
This commit is contained in:
parent
ce6b9f2f1d
commit
c912860a94
5 changed files with 24 additions and 24 deletions
|
@ -22,7 +22,7 @@ import (
|
|||
)
|
||||
|
||||
type unpacker interface {
|
||||
Unpack(headerBinary []byte, hdr *wire.ExtendedHeader, data []byte) (*unpackedPacket, error)
|
||||
Unpack(hdr *wire.ExtendedHeader, data []byte) (*unpackedPacket, error)
|
||||
}
|
||||
|
||||
type streamGetter interface {
|
||||
|
@ -503,7 +503,7 @@ func (s *session) handlePacketImpl(p *receivedPacket) error {
|
|||
// TODO(#1312): implement parsing of compound packets
|
||||
}
|
||||
|
||||
packet, err := s.unpacker.Unpack(hdr.Raw, hdr, data)
|
||||
packet, err := s.unpacker.Unpack(hdr, data)
|
||||
// if the decryption failed, this might be a packet sent by an attacker
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue