Skip to content
  • Rob Swindell's avatar
    221507a8
    Reduce the Terminal Server thread outcom timeout from 80 seconds to 800 ms · 221507a8
    Rob Swindell authored
    Since the Terminal Server is a single thread, let's not block for long
    periods of time trying to send bytes to a client (e.g. send the badip.msg
    file contents to a client with a blocked IP address), effectively DoSing the
    terminal server.
    
    This should address the problem reported via IRC:
    <theviper4> │Apr  9 15:38:11 viper-bbs synchronet: term Terminal Server timeout(outcom) 0000 0000
    <theviper4> │Apr  9 15:38:35 viper-bbs synchronet: term Terminal Server !ERROR 110 sending on socket 39
    <theviper4> │Apr  9 15:38:35 viper-bbs synchronet: term Terminal Server !ERROR 32 sending on socket 39
    <theviper4> │Apr  9 15:38:35 viper-bbs synchronet: term Terminal Server !ERROR 32 sending on socket 39
    <theviper4> │Apr  9 15:38:36 viper-bbs synchronet: term 0039 Telnet !CLIENT BLOCKED in ip.can: 117.95.153.33
    
    Also, make the outcom timeout error message more helpful (e.g. include the
    sock descriptor of the client) and don't use the old rioctl() function
    here any more.
    221507a8
    Reduce the Terminal Server thread outcom timeout from 80 seconds to 800 ms
    Rob Swindell authored
    Since the Terminal Server is a single thread, let's not block for long
    periods of time trying to send bytes to a client (e.g. send the badip.msg
    file contents to a client with a blocked IP address), effectively DoSing the
    terminal server.
    
    This should address the problem reported via IRC:
    <theviper4> │Apr  9 15:38:11 viper-bbs synchronet: term Terminal Server timeout(outcom) 0000 0000
    <theviper4> │Apr  9 15:38:35 viper-bbs synchronet: term Terminal Server !ERROR 110 sending on socket 39
    <theviper4> │Apr  9 15:38:35 viper-bbs synchronet: term Terminal Server !ERROR 32 sending on socket 39
    <theviper4> │Apr  9 15:38:35 viper-bbs synchronet: term Terminal Server !ERROR 32 sending on socket 39
    <theviper4> │Apr  9 15:38:36 viper-bbs synchronet: term 0039 Telnet !CLIENT BLOCKED in ip.can: 117.95.153.33
    
    Also, make the outcom timeout error message more helpful (e.g. include the
    sock descriptor of the client) and don't use the old rioctl() function
    here any more.
Loading