Changeset 40299


Ignore:
Timestamp:
2014-03-29T18:05:35+01:00 (4 years ago)
Author:
nbd
Message:

dropbear: add options SSHKeepAlive and IdleTimeout.

Without timeout mechanism, if ssh client disconnected without sending
FIN or RST, forked dropbear servers would hang there for
KEX_RETRY_TIMEOUT seconds (8 hours).

TCP keepalive is not implemented in dropbear yet, thus the name
SSHKeepAlive.

300 seconds in this patch is selected from the default value of
ServerAliveInterval for Debian ssh client (See man ssh_config).

Signed-off-by: Yousong Zhou <yszhou4tech@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/network/services/dropbear/files/dropbear.init

    r40298 r40299  
    4545                'dsskeyfile:file' \ 
    4646                'BannerFile:file' \ 
    47                 'Port:list(port):22' 
     47                'Port:list(port):22' \ 
     48                'SSHKeepAlive:uinteger:300' \ 
     49                'IdleTimeout:uinteger:0' 
    4850        return $? 
    4951} 
     
    7577        [ -n "${Interface}" ] && network_get_device Interface "${Interface}" 
    7678        append_ports "${Interface}" "${Port}" 
     79        [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}" 
     80        [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}" 
    7781        procd_close_instance 
    7882} 
Note: See TracChangeset for help on using the changeset viewer.