Delay TCP SYN retransmission on Linux
The tcp retransmission of the syn is related with the receive timeout (rto
) value (see the source code). By default it equals 1 second (defined here and here; min = 0.2 sec, max = 120 sec).
You can change the rto value for specified route with ip
util.
ip route replace 0/0 via <wifi-gw> dev <wifi-iface> rto_min 5s
But the application itself can change the rto value with the setsockopt call.