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 <laur...@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"
> 

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to