mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Renable keepalive now that libssh allows it
This commit is contained in:
parent
5c2c1c2584
commit
9c3cc0e264
@ -22,7 +22,7 @@ COPY . .
|
|||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
./autogen.sh; \
|
./autogen.sh; \
|
||||||
./configure --prefix=/usr CFLAGS="-D_GNU_SOURCE"; \
|
./configure --enable-latency --prefix=/usr CFLAGS="-D_GNU_SOURCE"; \
|
||||||
make -j "$(nproc)"; \
|
make -j "$(nproc)"; \
|
||||||
ln -s /src/tmate-ssh-server/tmate-ssh-server /usr/bin
|
ln -s /src/tmate-ssh-server/tmate-ssh-server /usr/bin
|
||||||
|
|
||||||
|
@ -30,10 +30,11 @@ static void on_keepalive_timer(__unused evutil_socket_t fd,
|
|||||||
struct tmate_ssh_client *client = arg;
|
struct tmate_ssh_client *client = arg;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* libssh-0.8.4 or higher have a broken keepalive implementation due
|
* libssh 0.8.4, 0.8.5, and 0.8.6 can't handle the response of the
|
||||||
* to packet filtering.
|
* keepalives due to packet filtering.
|
||||||
*/
|
*/
|
||||||
if (ssh_version(SSH_VERSION_INT(0,8,4)))
|
|
||||||
|
if (ssh_version(SSH_VERSION_INT(0,8,4)) && !ssh_version(SSH_VERSION_INT(0,8,7)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ssh_send_keepalive(client->session) == SSH_ERROR)
|
if (ssh_send_keepalive(client->session) == SSH_ERROR)
|
||||||
|
2
tmate.h
2
tmate.h
@ -146,7 +146,7 @@ extern void tmate_flush_pty(struct tmate_session *session);
|
|||||||
#ifdef ENABLE_LATENCY
|
#ifdef ENABLE_LATENCY
|
||||||
#define TMATE_SSH_KEEPALIVE 10
|
#define TMATE_SSH_KEEPALIVE 10
|
||||||
#else
|
#else
|
||||||
#define TMATE_SSH_KEEPALIVE 50
|
#define TMATE_SSH_KEEPALIVE 300
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TMATE_ROLE_DAEMON 1
|
#define TMATE_ROLE_DAEMON 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user