projects
/
openwrt
/
staging
/
lynxis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dropbear: add option to set receive window size
[openwrt/staging/lynxis.git]
/
package
/
network
/
services
/
dropbear
/
files
/
dropbear.init
diff --git
a/package/network/services/dropbear/files/dropbear.init
b/package/network/services/dropbear/files/dropbear.init
index 2d23ebd04568cff2d98ff9f6cae6c800d50c8152..2225113498a509403300e556a5da690e0b3959fb 100755
(executable)
--- a/
package/network/services/dropbear/files/dropbear.init
+++ b/
package/network/services/dropbear/files/dropbear.init
@@
-41,6
+41,8
@@
validate_section_dropbear()
'Port:list(port):22' \
'SSHKeepAlive:uinteger:300' \
'IdleTimeout:uinteger:0' \
'Port:list(port):22' \
'SSHKeepAlive:uinteger:300' \
'IdleTimeout:uinteger:0' \
+ 'MaxAuthTries:uinteger:3' \
+ 'RecvWindowSize:uinteger:0' \
'mdns:bool:1'
}
'mdns:bool:1'
}
@@
-49,7
+51,7
@@
dropbear_instance()
local PasswordAuth enable Interface GatewayPorts \
RootPasswordAuth RootLogin rsakeyfile \
BannerFile Port SSHKeepAlive IdleTimeout \
local PasswordAuth enable Interface GatewayPorts \
RootPasswordAuth RootLogin rsakeyfile \
BannerFile Port SSHKeepAlive IdleTimeout \
- mdns ipaddrs
+
MaxAuthTries RecvWindowSize
mdns ipaddrs
validate_section_dropbear "${1}" || {
echo "validation failed"
validate_section_dropbear "${1}" || {
echo "validation failed"
@@
-78,6
+80,9
@@
dropbear_instance()
append_ports "${ipaddrs}" "${Port}"
[ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
[ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
append_ports "${ipaddrs}" "${Port}"
[ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
[ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ [ "${MaxAuthTries}" -ne 0 ] && procd_append_param command -T "${MaxAuthTries}"
+ [ "${RecvWindowSize}" -gt 0 -a "${RecvWindowSize}" -le 1048576 ] && \
+ procd_append_param command -W "${RecvWindowSize}"
[ "${mdns}" -ne 0 ] && procd_add_mdns "ssh" "tcp" "$Port" "daemon=dropbear"
procd_set_param respawn
procd_close_instance
[ "${mdns}" -ne 0 ] && procd_add_mdns "ssh" "tcp" "$Port" "daemon=dropbear"
procd_set_param respawn
procd_close_instance