diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-15 02:11:28 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-02-15 02:11:39 +0000 |
commit | 2fe6a8711420abb2751e1b36e880019e8fb134a1 (patch) | |
tree | ef6297a2a353f609318f0d4131e9b22119b73f4e /debian/patches/getsockname-error.patch | |
parent | 99a7116957f4fe28a42db97edb20c424b4aa593d (diff) | |
parent | 18e1479bf4586a14b88dab082af10a8981b9d48d (diff) |
Fix getsockname errors when using "ssh -W" (closes: #738693).
Diffstat (limited to 'debian/patches/getsockname-error.patch')
-rw-r--r-- | debian/patches/getsockname-error.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/patches/getsockname-error.patch b/debian/patches/getsockname-error.patch new file mode 100644 index 000000000..b4dbc2c9f --- /dev/null +++ b/debian/patches/getsockname-error.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 18e1479bf4586a14b88dab082af10a8981b9d48d Mon Sep 17 00:00:00 2001 | ||
2 | From: Damien Miller <djm@mindrot.org> | ||
3 | Date: Sat, 15 Feb 2014 02:08:20 +0000 | ||
4 | Subject: Skip get_sock_port call for c->sock==-1 | ||
5 | |||
6 | Origin: upstream, https://bugzilla.mindrot.org/show_bug.cgi?id=2200 | ||
7 | Bug-Debian: http://bugs.debian.org/738693 | ||
8 | Last-Update: 2014-02-15 | ||
9 | |||
10 | Patch-Name: getsockname-error.patch | ||
11 | --- | ||
12 | channels.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/channels.c b/channels.c | ||
16 | index e741f29..8e66265 100644 | ||
17 | --- a/channels.c | ||
18 | +++ b/channels.c | ||
19 | @@ -1386,7 +1386,7 @@ port_open_helper(Channel *c, char *rtype) | ||
20 | int direct; | ||
21 | char buf[1024]; | ||
22 | char *local_ipaddr = get_local_ipaddr(c->sock); | ||
23 | - int local_port = get_sock_port(c->sock, 1); | ||
24 | + int local_port = c->sock == -1 ? 65536 : get_sock_port(c->sock, 1); | ||
25 | char *remote_ipaddr = get_peer_ipaddr(c->sock); | ||
26 | int remote_port = get_peer_port(c->sock); | ||
27 | |||