diff options
-rw-r--r-- | regress/forwarding.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/regress/forwarding.sh b/regress/forwarding.sh index 42d9f65d1..0eee3176a 100644 --- a/regress/forwarding.sh +++ b/regress/forwarding.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: forwarding.sh,v 1.13 2015/02/21 20:51:02 djm Exp $ | 1 | # $OpenBSD: forwarding.sh,v 1.14 2015/02/23 20:32:15 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="local and remote forwarding" | 4 | tid="local and remote forwarding" |
@@ -10,6 +10,9 @@ start_sshd | |||
10 | base=33 | 10 | base=33 |
11 | last=$PORT | 11 | last=$PORT |
12 | fwd="" | 12 | fwd="" |
13 | CTL=$OBJ/ctl-sock | ||
14 | rm -f $CTL | ||
15 | |||
13 | for j in 0 1 2; do | 16 | for j in 0 1 2; do |
14 | for i in 0 1 2; do | 17 | for i in 0 1 2; do |
15 | a=$base$j$i | 18 | a=$base$j$i |
@@ -109,7 +112,7 @@ echo "LocalForward ${base}01 127.0.0.1:$PORT" >> $OBJ/ssh_config | |||
109 | echo "RemoteForward ${base}02 127.0.0.1:${base}01" >> $OBJ/ssh_config | 112 | echo "RemoteForward ${base}02 127.0.0.1:${base}01" >> $OBJ/ssh_config |
110 | for p in 1 2; do | 113 | for p in 1 2; do |
111 | trace "config file: start forwarding, fork to background" | 114 | trace "config file: start forwarding, fork to background" |
112 | ${SSH} -$p -F $OBJ/ssh_config -f somehost sleep 10 | 115 | ${SSH} -S $CTL -M -$p -F $OBJ/ssh_config -f somehost sleep 10 |
113 | 116 | ||
114 | trace "config file: transfer over forwarded channels and check result" | 117 | trace "config file: transfer over forwarded channels and check result" |
115 | ${SSH} -F $OBJ/ssh_config -p${base}02 -o 'ConnectionAttempts=4' \ | 118 | ${SSH} -F $OBJ/ssh_config -p${base}02 -o 'ConnectionAttempts=4' \ |
@@ -117,7 +120,7 @@ for p in 1 2; do | |||
117 | test -s ${COPY} || fail "failed copy of ${DATA}" | 120 | test -s ${COPY} || fail "failed copy of ${DATA}" |
118 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" | 121 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" |
119 | 122 | ||
120 | wait | 123 | ${SSH} -S $CTL -O exit somehost |
121 | done | 124 | done |
122 | 125 | ||
123 | for p in 2; do | 126 | for p in 2; do |