fix for improper handshake conclusion

This commit is contained in:
Muaz Ahmad 2024-02-27 13:04:25 +05:00
parent 9b85fdb456
commit 6fa6482162

View file

@ -146,8 +146,12 @@ func (agent *SRTManager) create_conclusion_resp() (*Packet) {
func (agent *SRTManager) process_conclusion(packet *Packet) (*Packet) {
resp_packet := agent.create_conclusion_resp()
if packet.packet_type == HANDSHAKE {
// allow previous shotgunned induction requests to dissipate
if hs_cif.hs_type != 0xffffffff {
return nil
}
hs_cif := packet.cif.(*HandshakeCIF)
if hs_cif.hs_type == 0xffffffff && hs_cif.syn_cookie == agent.syn_cookie {
if hs_cif.syn_cookie == agent.syn_cookie {
for _, v := range hs_cif.hs_extensions {
// force client to add a stream_id for output location
// to do: add encryption handling