mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-23 18:32:26 +00:00
upstream: Handle dynamic remote port forwarding in escape commandline's
-R processing. bz#3499, ok djm@ OpenBSD-Commit-ID: 194ee4cfe7ed0e2b8ad0727f493c798a50454208
This commit is contained in:
parent
5372db7e79
commit
650de7ecd3
13
clientloop.c
13
clientloop.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: clientloop.c,v 1.381 2022/11/09 01:37:44 djm Exp $ */
|
/* $OpenBSD: clientloop.c,v 1.382 2022/11/10 23:03:10 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -846,8 +846,15 @@ process_cmdline(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
logit("Canceled forwarding.");
|
logit("Canceled forwarding.");
|
||||||
} else {
|
} else {
|
||||||
if (!parse_forward(&fwd, s, dynamic, remote)) {
|
/* -R specs can be both dynamic or not, so check both. */
|
||||||
logit("Bad forwarding specification.");
|
if (remote) {
|
||||||
|
if (!parse_forward(&fwd, s, 0, remote) &&
|
||||||
|
!parse_forward(&fwd, s, 1, remote)) {
|
||||||
|
logit("Bad remote forwarding specification.");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
} else if (!parse_forward(&fwd, s, dynamic, remote)) {
|
||||||
|
logit("Bad local forwarding specification.");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (local || dynamic) {
|
if (local || dynamic) {
|
||||||
|
Loading…
Reference in New Issue
Block a user