summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-07-25 12:08:46 +1000
committerDamien Miller <djm@mindrot.org>2013-07-25 12:08:46 +1000
commit78d47b7c5b182e44552913de2b4b7e0363c8e3cc (patch)
treea7b6ba7e29dc87ada0f1b1c561201d4234f80bc2
parentfea440639e04cea9f2605375a41d654390369402 (diff)
- dtucker@cvs.openbsd.org 2013/06/10 21:56:43
[regress/forwarding.sh] Add test for forward config parsing
-rw-r--r--ChangeLog3
-rw-r--r--regress/forwarding.sh17
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5daedfa4..841988bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,9 @@
- dtucker@cvs.openbsd.org 2013/05/30 20:12:32
[regress/test-exec.sh]
use ssh and sshd as testdata since it needs to be >256k for the rekey test
+ - dtucker@cvs.openbsd.org 2013/06/10 21:56:43
+ [regress/forwarding.sh]
+ Add test for forward config parsing
20130720
- (djm) OpenBSD CVS Sync
diff --git a/regress/forwarding.sh b/regress/forwarding.sh
index 1c408603..ca48b40a 100644
--- a/regress/forwarding.sh
+++ b/regress/forwarding.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: forwarding.sh,v 1.10 2013/05/17 04:29:14 dtucker Exp $
+# $OpenBSD: forwarding.sh,v 1.11 2013/06/10 21:56:43 dtucker Exp $
# Placed in the Public Domain.
tid="local and remote forwarding"
@@ -104,3 +104,18 @@ for p in 2; do
fail "stdio forwarding proto $p"
fi
done
+
+echo "LocalForward ${base}01 127.0.0.1:$PORT" >> ssh_config
+echo "RemoteForward ${base}02 127.0.0.1:${base}01" >> ssh_config
+for p in 1 2; do
+ trace "config file: start forwarding, fork to background"
+ ${SSH} -$p -F $OBJ/ssh_config -f somehost sleep 10
+
+ trace "config file: transfer over forwarded channels and check result"
+ ${SSH} -F $OBJ/ssh_config -p${base}02 -o 'ConnectionAttempts=4' \
+ somehost cat ${DATA} > ${COPY}
+ test -f ${COPY} || fail "failed copy of ${DATA}"
+ cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
+
+ wait
+done