diff options
author | Sergey Ponomarev <stokito@gmail.com> | 2023-06-21 19:58:48 +0300 |
---|---|---|
committer | Nuno Goncalves <nunojpg@gmail.com> | 2023-10-08 10:29:37 +0100 |
commit | 9dd8a62238d79b94d293c2c1c1631a25eafe98d1 (patch) | |
tree | a4509238d2dcc9b82ed050038df0b53e3879b974 /net/sshtunnel/files | |
parent | 1d9f10a1356df1862bfff4f3031011403ddfe0bd (diff) |
sshtunnel: allow empty remoteaddress
Just empty or * may have some semantic difference on a server
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Diffstat (limited to 'net/sshtunnel/files')
-rw-r--r-- | net/sshtunnel/files/sshtunnel.init | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sshtunnel/files/sshtunnel.init b/net/sshtunnel/files/sshtunnel.init index 144d447e8..1274be249 100644 --- a/net/sshtunnel/files/sshtunnel.init +++ b/net/sshtunnel/files/sshtunnel.init @@ -57,7 +57,7 @@ validate_server_section() { validate_tunnelR_section() { uci_load_validate sshtunnel tunnelR "$1" "$2" \ - 'remoteaddress:or(host, "*"):*' \ + 'remoteaddress:or(host, "*")' \ 'remoteport:port' \ 'localaddress:host' \ 'localport:port' @@ -67,13 +67,13 @@ validate_tunnelL_section() { uci_load_validate sshtunnel tunnelL "$1" "$2" \ 'remoteaddress:host' \ 'remoteport:port' \ - 'localaddress:or(host, "*"):*' \ + 'localaddress:or(host, "*")' \ 'localport:port' } validate_tunnelD_section() { uci_load_validate sshtunnel tunnelD "$1" "$2" \ - 'localaddress:or(host, "*"):*' \ + 'localaddress:or(host, "*")' \ 'localport:port' } @@ -93,7 +93,7 @@ load_tunnelR() { # validate and load this remote tunnel config [ "$2" = 0 ] || { _err "tunnelR $1: validation failed"; return 1; } - [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelR $1: missing required options"; return 1; } + [ -n "$remoteport" -a -n "$localport" ] || { _err "tunnelR $1: missing required options"; return 1; } # count nr of valid sections to make sure there are at least one count=$((count+=1)) @@ -111,7 +111,7 @@ load_tunnelL() { # validate and load this remote tunnel config [ "$2" = 0 ] || { _err "tunnelL $1: validation failed"; return 1; } - [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelL $1: missing required options"; return 1; } + [ -n "$remoteport" -a -n "$localport" ] || { _err "tunnelL $1: missing required options"; return 1; } # count nr of valid sections to make sure there are at least one count=$((count+=1)) |