mirror of git://anongit.mindrot.org/openssh.git
don't test IPv6 addresses if platform lacks support
This commit is contained in:
parent
d77fc611a6
commit
dd1249bd5c
|
@ -10,6 +10,11 @@ cp $OBJ/ssh_config $OBJ/ssh_config.orig
|
||||||
proxycmd="$OBJ/netcat -x 127.0.0.1:$FWDPORT -X"
|
proxycmd="$OBJ/netcat -x 127.0.0.1:$FWDPORT -X"
|
||||||
trace "will use ProxyCommand $proxycmd"
|
trace "will use ProxyCommand $proxycmd"
|
||||||
|
|
||||||
|
# This is a reasonable proxy for IPv6 support.
|
||||||
|
if ! config_defined HAVE_STRUCT_IN6_ADDR ; then
|
||||||
|
SKIP_IPV6=yes
|
||||||
|
fi
|
||||||
|
|
||||||
start_ssh() {
|
start_ssh() {
|
||||||
direction="$1"
|
direction="$1"
|
||||||
arg="$2"
|
arg="$2"
|
||||||
|
@ -90,14 +95,16 @@ for d in D R; do
|
||||||
stop_ssh
|
stop_ssh
|
||||||
|
|
||||||
verbose "PermitRemoteOpen=explicit"
|
verbose "PermitRemoteOpen=explicit"
|
||||||
start_ssh $d \
|
permit="127.0.0.1:$PORT [::1]:$PORT localhost:$PORT"
|
||||||
PermitRemoteOpen="127.0.0.1:$PORT [::1]:$PORT localhost:$PORT"
|
test -z "$SKIP_IPV6" || permit="127.0.0.1:$PORT localhost:$PORT"
|
||||||
|
start_ssh $d PermitRemoteOpen="$permit"
|
||||||
check_socks $d Y
|
check_socks $d Y
|
||||||
stop_ssh
|
stop_ssh
|
||||||
|
|
||||||
verbose "PermitRemoteOpen=disallowed"
|
verbose "PermitRemoteOpen=disallowed"
|
||||||
start_ssh $d \
|
permit="127.0.0.1:1 [::1]:1 localhost:1"
|
||||||
PermitRemoteOpen="127.0.0.1:1 [::1]:1 localhost:1"
|
test -z "$SKIP_IPV6" || permit="127.0.0.1:1 localhost:1"
|
||||||
|
start_ssh $d PermitRemoteOpen="$permit"
|
||||||
check_socks $d N
|
check_socks $d N
|
||||||
stop_ssh
|
stop_ssh
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue