In the Quic code base at https://github.com/signetlabdei/quic, there is a problem causing "Duplicate transport parameters reception" error and stopping the connection.
I tested Quic on 5G NR network. It has a slotted physical layer, so it is possible that some packets arrive to a cell phone at the same time in the same slot. In the initial handshake of Quic, a client first sends and Initial packet. With the current default settings, the server replies with "Version Negotiation" and "Handshake" packets. In a 5G network, these to packets may arrive to the client at the same time. When they arrive to the client at the same time, the client is trying to send its replies "initial" and "handshake" frames together. However, the total size is larger than MTU, so they are divided into two packets. This causes the server to run function QuicSocketBase::OnReceivedTransportParameters, twice. However, running it twice gives the error "Duplicate transport parameters reception" and stops the connection.
I fixed the problem by adding the following code after the "else if (quicHeader.IsHandshake () and m_socketState == CONNECTING_SVR)" in quic-socket-base.cc . There may be a better way to fix it.
Below is the netanim log of a simulation that failed with "Duplicate transport parameters reception" error. As it is a NR simulation, the packet arrival and depature times are a bit different than real simulation, so it is not possible to see that "Version Negotiation" and "Handshake" packets arriving the client at the same time.
In the Quic code base at https://github.com/signetlabdei/quic, there is a problem causing "Duplicate transport parameters reception" error and stopping the connection.
I tested Quic on 5G NR network. It has a slotted physical layer, so it is possible that some packets arrive to a cell phone at the same time in the same slot. In the initial handshake of Quic, a client first sends and Initial packet. With the current default settings, the server replies with "Version Negotiation" and "Handshake" packets. In a 5G network, these to packets may arrive to the client at the same time. When they arrive to the client at the same time, the client is trying to send its replies "initial" and "handshake" frames together. However, the total size is larger than MTU, so they are divided into two packets. This causes the server to run function QuicSocketBase::OnReceivedTransportParameters, twice. However, running it twice gives the error "Duplicate transport parameters reception" and stops the connection.
I fixed the problem by adding the following code after the "else if (quicHeader.IsHandshake () and m_socketState == CONNECTING_SVR)" in quic-socket-base.cc . There may be a better way to fix it.
Below is the netanim log of a simulation that failed with "Duplicate transport parameters reception" error. As it is a NR simulation, the packet arrival and depature times are a bit different than real simulation, so it is not possible to see that "Version Negotiation" and "Handshake" packets arriving the client at the same time.
After adding the new code the last packet in the log becomes: