diff options
author | Damien Miller <djm@mindrot.org> | 2010-02-02 17:02:07 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-02-02 17:02:07 +1100 |
commit | d636943d088349d13eae228871132849b8d5174c (patch) | |
tree | 08ae6e63edaf424898ce6013034998fc051bbd23 | |
parent | 74d9825c0fb714398667200c6ca5ef8d2431ed8b (diff) |
- 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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | channels.c | 9 |
2 files changed, 14 insertions, 1 deletions
@@ -3,6 +3,12 @@ | |||
3 | - djm@cvs.openbsd.org 2010/01/30 21:08:33 | 3 | - djm@cvs.openbsd.org 2010/01/30 21:08:33 |
4 | [sshd.8] | 4 | [sshd.8] |
5 | debug output goes to stderr, not "the system log"; ok markus dtucker | 5 | debug output goes to stderr, not "the system log"; ok markus dtucker |
6 | - djm@cvs.openbsd.org 2010/01/30 21:12:08 | ||
7 | [channels.c] | ||
8 | fake local addr:port when stdio fowarding as some servers (Tectia at | ||
9 | least) validate that they are well-formed; | ||
10 | reported by imorgan AT nas.nasa.gov | ||
11 | ok dtucker | ||
6 | 12 | ||
7 | 20100130 | 13 | 20100130 |
8 | - (djm) OpenBSD CVS Sync | 14 | - (djm) OpenBSD CVS Sync |
diff --git a/channels.c b/channels.c index 81261679a..d8c53a4a8 100644 --- a/channels.c +++ b/channels.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: channels.c,v 1.302 2010/01/26 01:28:35 djm Exp $ */ | 1 | /* $OpenBSD: channels.c,v 1.303 2010/01/30 21:12:08 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1376,6 +1376,13 @@ port_open_helper(Channel *c, char *rtype) | |||
1376 | char *remote_ipaddr = get_peer_ipaddr(c->sock); | 1376 | char *remote_ipaddr = get_peer_ipaddr(c->sock); |
1377 | int remote_port = get_peer_port(c->sock); | 1377 | int remote_port = get_peer_port(c->sock); |
1378 | 1378 | ||
1379 | if (remote_port == -1) { | ||
1380 | /* Fake addr/port to appease peers that validate it (Tectia) */ | ||
1381 | xfree(remote_ipaddr); | ||
1382 | remote_ipaddr = xstrdup("127.0.0.1"); | ||
1383 | remote_port = 65535; | ||
1384 | } | ||
1385 | |||
1379 | direct = (strcmp(rtype, "direct-tcpip") == 0); | 1386 | direct = (strcmp(rtype, "direct-tcpip") == 0); |
1380 | 1387 | ||
1381 | snprintf(buf, sizeof buf, | 1388 | snprintf(buf, sizeof buf, |