[LEDE-DEV] [PATCH] dropbear: Fix append_port in IPv6 case (v2)
John Crispin
john at phrozen.org
Wed Jul 27 22:07:15 PDT 2016
On 09/07/2016 23:55, Laurent GUERBY wrote:
> The new IPPort parameter allows to pass unchanged parameters to dropbear,
> dropbear uses -p [ip6]:port for IPv6 and this was not supported with
> existing scripts.
>
> Fix indentation and missing then of previous patch.
>
> Signed-off-by: Laurent GUERBY <laurent at guerby.net>
> ---
> package/network/services/dropbear/files/dropbear.init | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
> index 5c3345d..c4d6c78 100755
> --- a/package/network/services/dropbear/files/dropbear.init
> +++ b/package/network/services/dropbear/files/dropbear.init
> @@ -41,7 +41,8 @@ validate_section_dropbear()
> 'Port:list(port):22' \
> 'SSHKeepAlive:uinteger:300' \
> 'IdleTimeout:uinteger:0' \
> - 'mdns:uinteger:1'
> + 'mdns:uinteger:1' \
> + 'IPPort:string'
> }
Hi,
maybe ipaddrs6 and Port6 might be better ? depending the choice of v4 vs
v6 on the name of the port parameter seems odd, specially as it is not
named in a consistent manner.
John
>
> dropbear_instance()
> @@ -75,7 +76,11 @@ dropbear_instance()
> [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
> [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
> [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
> - append_ports "${ipaddrs}" "${Port}"
> + if [ -n "${IPPort}" ]; then
> + procd_append_param command -p "${IPPort}"
> + else
> + append_ports "${ipaddrs}" "${Port}"
> + fi
> [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
> [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
> [ "${mdns}" -ne 0 ] && procd_add_mdns "ssh" "tcp" "$Port" "daemon=dropbear"
>
More information about the Lede-dev
mailing list