mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-01-13 05:01:01 +00:00
- djm@cvs.openbsd.org 2010/01/30 21:12:08
[channels.c] fake local addr:port when stdio fowarding as some servers (Tectia at least) validate that they are well-formed; reported by imorgan AT nas.nasa.gov ok dtucker
This commit is contained in:
parent
74d9825c0f
commit
d636943d08
@ -3,6 +3,12 @@
|
||||
- djm@cvs.openbsd.org 2010/01/30 21:08:33
|
||||
[sshd.8]
|
||||
debug output goes to stderr, not "the system log"; ok markus dtucker
|
||||
- djm@cvs.openbsd.org 2010/01/30 21:12:08
|
||||
[channels.c]
|
||||
fake local addr:port when stdio fowarding as some servers (Tectia at
|
||||
least) validate that they are well-formed;
|
||||
reported by imorgan AT nas.nasa.gov
|
||||
ok dtucker
|
||||
|
||||
20100130
|
||||
- (djm) OpenBSD CVS Sync
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: channels.c,v 1.302 2010/01/26 01:28:35 djm Exp $ */
|
||||
/* $OpenBSD: channels.c,v 1.303 2010/01/30 21:12:08 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -1376,6 +1376,13 @@ port_open_helper(Channel *c, char *rtype)
|
||||
char *remote_ipaddr = get_peer_ipaddr(c->sock);
|
||||
int remote_port = get_peer_port(c->sock);
|
||||
|
||||
if (remote_port == -1) {
|
||||
/* Fake addr/port to appease peers that validate it (Tectia) */
|
||||
xfree(remote_ipaddr);
|
||||
remote_ipaddr = xstrdup("127.0.0.1");
|
||||
remote_port = 65535;
|
||||
}
|
||||
|
||||
direct = (strcmp(rtype, "direct-tcpip") == 0);
|
||||
|
||||
snprintf(buf, sizeof buf,
|
||||
|
Loading…
Reference in New Issue
Block a user