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@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40299
3c298f89-4303-0410-b956-
a3cf2f4a3e73
'rsakeyfile:file' \
'dsskeyfile:file' \
'BannerFile:file' \
- 'Port:list(port):22'
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
return $?
}
[ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
[ -n "${Interface}" ] && network_get_device Interface "${Interface}"
append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
procd_close_instance
}