validate_tunnelR_section() {
uci_load_validate sshtunnel tunnelR "$1" "$2" \
- 'remoteaddress:or(host, "*"):*' \
+ 'remoteaddress:or(host, "*")' \
'remoteport:port' \
'localaddress:host' \
'localport:port'
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'
}
# 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))
# 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))