forked from quic-go/quic-go
Merge pull request #2226 from lucas-clemente/retry-integrity
implement the retry integrity tag
This commit is contained in:
@@ -253,8 +253,7 @@ var _ = Describe("MITM test", func() {
|
||||
It("downloads a message when packet are corrupted towards the client", func() {
|
||||
dropCb := func(dir quicproxy.Direction, raw []byte) bool {
|
||||
defer GinkgoRecover()
|
||||
isRetry := raw[0]&0xc0 == 0xc0 // don't corrupt Retry packets
|
||||
if dir == quicproxy.DirectionOutgoing && mrand.Intn(interval) == 0 && !isRetry {
|
||||
if dir == quicproxy.DirectionOutgoing && mrand.Intn(interval) == 0 {
|
||||
pos := mrand.Intn(len(raw))
|
||||
raw[pos] = byte(mrand.Intn(256))
|
||||
_, err := serverConn.WriteTo(raw, clientConn.LocalAddr())
|
||||
|
||||
Reference in New Issue
Block a user