limit available window to 3x of received bytes before address validation

This commit is contained in:
Marten Seemann 2020-04-23 13:34:31 +07:00
parent 98233f6743
commit 60a918a108
9 changed files with 186 additions and 13 deletions

View file

@ -38,6 +38,20 @@ func (m *MockSentPacketHandler) EXPECT() *MockSentPacketHandlerMockRecorder {
return m.recorder
}
// AmplificationWindow mocks base method
func (m *MockSentPacketHandler) AmplificationWindow() protocol.ByteCount {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AmplificationWindow")
ret0, _ := ret[0].(protocol.ByteCount)
return ret0
}
// AmplificationWindow indicates an expected call of AmplificationWindow
func (mr *MockSentPacketHandlerMockRecorder) AmplificationWindow() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AmplificationWindow", reflect.TypeOf((*MockSentPacketHandler)(nil).AmplificationWindow))
}
// DropPackets mocks base method
func (m *MockSentPacketHandler) DropPackets(arg0 protocol.EncryptionLevel) {
m.ctrl.T.Helper()
@ -149,6 +163,18 @@ func (mr *MockSentPacketHandlerMockRecorder) ReceivedAck(arg0, arg1, arg2 interf
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedAck", reflect.TypeOf((*MockSentPacketHandler)(nil).ReceivedAck), arg0, arg1, arg2)
}
// ReceivedBytes mocks base method
func (m *MockSentPacketHandler) ReceivedBytes(arg0 protocol.ByteCount) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReceivedBytes", arg0)
}
// ReceivedBytes indicates an expected call of ReceivedBytes
func (mr *MockSentPacketHandlerMockRecorder) ReceivedBytes(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedBytes", reflect.TypeOf((*MockSentPacketHandler)(nil).ReceivedBytes), arg0)
}
// ResetForRetry mocks base method
func (m *MockSentPacketHandler) ResetForRetry() error {
m.ctrl.T.Helper()