1
0
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:
Nicolas Viennot 2019-10-09 18:45:20 -04:00
parent 5c2c1c2584
commit 9c3cc0e264
3 changed files with 6 additions and 5 deletions

View File

@ -22,7 +22,7 @@ COPY . .
RUN set -ex; \
./autogen.sh; \
./configure --prefix=/usr CFLAGS="-D_GNU_SOURCE"; \
./configure --enable-latency --prefix=/usr CFLAGS="-D_GNU_SOURCE"; \
make -j "$(nproc)"; \
ln -s /src/tmate-ssh-server/tmate-ssh-server /usr/bin

View File

@ -30,10 +30,11 @@ static void on_keepalive_timer(__unused evutil_socket_t fd,
struct tmate_ssh_client *client = arg;
/*
* libssh-0.8.4 or higher have a broken keepalive implementation due
* to packet filtering.
* libssh 0.8.4, 0.8.5, and 0.8.6 can't handle the response of the
* 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;
if (ssh_send_keepalive(client->session) == SSH_ERROR)

View File

@ -146,7 +146,7 @@ extern void tmate_flush_pty(struct tmate_session *session);
#ifdef ENABLE_LATENCY
#define TMATE_SSH_KEEPALIVE 10
#else
#define TMATE_SSH_KEEPALIVE 50
#define TMATE_SSH_KEEPALIVE 300
#endif
#define TMATE_ROLE_DAEMON 1