Bugzilla – Attachment 3029 Details for
Bug 2756
sshd does not seem to terminate despite ClientAlive[Interval|CountMax] when a process is polling a remote forwarding channel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
keep track of the last time we heard from the client and trigger client_alive_check()
openssh-keepalive-portfwd.patch (text/plain), 1.02 KB, created by
Darren Tucker
on 2017-08-09 18:56:37 AEST
(
hide
)
Description:
keep track of the last time we heard from the client and trigger client_alive_check()
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2017-08-09 18:56:37 AEST
Size:
1.02 KB
patch
obsolete
>diff --git a/serverloop.c b/serverloop.c >index b5eb344..01c6b12 100644 >--- a/serverloop.c >+++ b/serverloop.c >@@ -204,6 +204,7 @@ wait_until_can_do_something(int connection_in, int connection_out, > int ret; > time_t minwait_secs = 0; > int client_alive_scheduled = 0; >+ static time_t last_client_time; > > /* Allocate and update select() masks for channel descriptors. */ > channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, >@@ -268,8 +269,15 @@ wait_until_can_do_something(int connection_in, int connection_out, > memset(*writesetp, 0, *nallocp); > if (errno != EINTR) > error("select: %.100s", strerror(errno)); >- } else if (ret == 0 && client_alive_scheduled) >- client_alive_check(); >+ } else if (client_alive_scheduled) { >+ if (ret == 0) /* timeout */ >+ client_alive_check(); >+ if (FD_ISSET(connection_in, *readsetp)) >+ last_client_time = monotime(); >+ else if (last_client_time != 0 && >+ last_client_time + options.client_alive_interval < monotime()) >+ client_alive_check(); >+ } > > notify_done(*readsetp); > }
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
Actions:
View
|
Diff
Attachments on
bug 2756
:
3029
|
3030