Bugzilla – Attachment 2987 Details for
Bug 2707
mux_client_hello_exchange: write packet: Broken pipe when timeout is about to expire
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
don't fatal on mux establishment errors
bz2707.diff (text/plain), 1.50 KB, created by
Damien Miller
on 2017-06-02 15:11:30 AEST
(
hide
)
Description:
don't fatal on mux establishment errors
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2017-06-02 15:11:30 AEST
Size:
1.50 KB
patch
obsolete
>diff --git a/mux.c b/mux.c >index 2d6639c5..0da23d62 100644 >--- a/mux.c >+++ b/mux.c >@@ -1570,31 +1570,38 @@ mux_client_hello_exchange(int fd) > { > Buffer m; > u_int type, ver; >+ int ret = -1; > > buffer_init(&m); > buffer_put_int(&m, MUX_MSG_HELLO); > buffer_put_int(&m, SSHMUX_VER); > /* no extensions */ > >- if (mux_client_write_packet(fd, &m) != 0) >- fatal("%s: write packet: %s", __func__, strerror(errno)); >+ if (mux_client_write_packet(fd, &m) != 0) { >+ debug("%s: write packet: %s", __func__, strerror(errno)); >+ goto out; >+ } > > buffer_clear(&m); > > /* Read their HELLO */ > if (mux_client_read_packet(fd, &m) != 0) { >- buffer_free(&m); >- return -1; >+ debug("%s: read packet failed", __func__); >+ goto out; > } > > type = buffer_get_int(&m); >- if (type != MUX_MSG_HELLO) >- fatal("%s: expected HELLO (%u) received %u", >+ if (type != MUX_MSG_HELLO) { >+ error("%s: expected HELLO (%u) received %u", > __func__, MUX_MSG_HELLO, type); >+ goto out; >+ } > ver = buffer_get_int(&m); >- if (ver != SSHMUX_VER) >- fatal("Unsupported multiplexing protocol version %d " >+ if (ver != SSHMUX_VER) { >+ error("Unsupported multiplexing protocol version %d " > "(expected %d)", ver, SSHMUX_VER); >+ goto out; >+ } > debug2("%s: master version %u", __func__, ver); > /* No extensions are presently defined */ > while (buffer_len(&m) > 0) { >@@ -1605,8 +1612,11 @@ mux_client_hello_exchange(int fd) > free(name); > free(value); > } >+ /* success */ >+ ret = 0; >+ out: > buffer_free(&m); >- return 0; >+ return ret; > } > > static u_int
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2707
: 2987