mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
Merge pull request #2 from marten-seemann/master
fix QuicVersion32, enforce exact QuicVersion
This commit is contained in:
commit
98cd4aa513
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
const (
|
||||
// QuicVersion32 is Q032
|
||||
QuicVersion32 uint32 = 'Q' + '0'<<8 + '3'<<16 + '2'<<24
|
||||
QuicVersion32 uint32 = 'Q'<<24 + '0'<<16 + '3'<<8 + '2'
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -47,9 +47,9 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
if publicHeader.VersionFlag && publicHeader.QuicVersion < QuicVersion32 {
|
||||
if publicHeader.VersionFlag && publicHeader.QuicVersion != QuicVersion32 {
|
||||
println(publicHeader.QuicVersion)
|
||||
panic("only versions >= Q032 supported")
|
||||
panic("only version Q032 supported")
|
||||
}
|
||||
|
||||
nullAEAD := &crypto.NullAEAD{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue