summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/relayd/remote.pl
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-02-07 22:56:28 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-02-07 22:56:28 +0000
commitc0c3d14f297c1e7d149229f1bcf8730dcb551ad2 (patch)
tree263fcd71c46e15670d874e3b90cba357e61b5199 /regress/usr.sbin/relayd/remote.pl
parent3e47d2b6fb93a16503e0b7af5c1c361251b570df (diff)
Add relayd regression tests with http filter and late connect.
Diffstat (limited to 'regress/usr.sbin/relayd/remote.pl')
-rw-r--r--regress/usr.sbin/relayd/remote.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/regress/usr.sbin/relayd/remote.pl b/regress/usr.sbin/relayd/remote.pl
index de1ae60d11c..b3394d988e2 100644
--- a/regress/usr.sbin/relayd/remote.pl
+++ b/regress/usr.sbin/relayd/remote.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $OpenBSD: remote.pl,v 1.2 2013/01/04 14:01:49 bluhm Exp $
+# $OpenBSD: remote.pl,v 1.3 2013/02/07 22:56:27 bluhm Exp $
# Copyright (c) 2010-2013 Alexander Bluhm <bluhm@openbsd.org>
#
@@ -102,7 +102,7 @@ my $s = Server->new(
listendomain => AF_INET,
listenaddr => ($mode eq "auto" ? $ARGV[1] : undef),
listenport => ($mode eq "manual" ? $ARGV[0] : undef),
-);
+) unless $args{server}{noserver};
if ($mode eq "auto") {
$r = Remote->new(
forward => $ARGV[0],
@@ -112,7 +112,7 @@ if ($mode eq "auto") {
remotessh => $ARGV[3],
listenaddr => $ARGV[2],
connectaddr => $ARGV[1],
- connectport => $s->{listenport},
+ connectport => $s ? $s->{listenport} : 1,
);
$r->run->up;
}
@@ -124,12 +124,12 @@ my $c = Client->new(
connectport => ($mode eq "manual" ? $ARGV[2] : $r->{listenport}),
);
-$s->run;
+$s->run unless $args{server}{noserver};
$c->run->up;
-$s->up;
+$s->up unless $args{server}{noserver};
$c->down;
-$s->down;
+$s->down unless $args{server}{noserver};
$r->close_child;
$r->down;