UDP_TIMEOUT is handled incorrectly
Brought to you by:
matteoricchetti
SS5 3.8.9-8 will terminate a UDP association in 60 sec whether or not any UDP packet is transmitted
(in SS5Core.c line 911)
IFSELECT( if( (fd=select(SS5ClientInfo.Socket+SS5ClientInfo.udpSocket+SS5ClientInfo.appSocket+1,&fdset,NULL,NULL,&tv)) ) { )
The timeout argument "&tv" is initialized only once and passed to the select function repeatedly. According to the select(2) man doc:
select() may update the timeout argument to indicate how much time was left.
Should initialize "tv" every time before calling select()