immediately retire the connection ID sent in the preferred_address

This commit is contained in:
Marten Seemann
2019-11-27 19:06:32 +07:00
parent d771650640
commit ee6beff7cf
2 changed files with 37 additions and 1 deletions

View File

@@ -1115,7 +1115,12 @@ func (s *session) processTransportParametersForClient(data []byte) (*handshake.T
if !params.OriginalConnectionID.Equal(s.origDestConnID) {
return nil, qerr.Error(qerr.TransportParameterError, fmt.Sprintf("expected original_connection_id to equal %s, is %s", s.origDestConnID, params.OriginalConnectionID))
}
// We don't support connection migration yet, so we don't have any use for the preferred_address.
if params.PreferredAddress != nil {
s.logger.Debugf("Server sent preferred_address. Retiring the preferred_address connection ID.")
// Retire the connection ID.
s.framer.QueueControlFrame(&wire.RetireConnectionIDFrame{SequenceNumber: 1})
}
return params, nil
}