summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/serverloop.c b/serverloop.c
index c4e35a377..48bea96a1 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.115 2004/01/19 21:25:15 markus Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.117 2004/08/11 21:43:05 avsm Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
@@ -240,7 +240,7 @@ client_alive_check(void)
240 */ 240 */
241static void 241static void
242wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp, 242wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
243 int *nallocp, u_int max_time_milliseconds) 243 u_int *nallocp, u_int max_time_milliseconds)
244{ 244{
245 struct timeval tv, *tvp; 245 struct timeval tv, *tvp;
246 int ret; 246 int ret;
@@ -486,7 +486,8 @@ void
486server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg) 486server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
487{ 487{
488 fd_set *readset = NULL, *writeset = NULL; 488 fd_set *readset = NULL, *writeset = NULL;
489 int max_fd = 0, nalloc = 0; 489 int max_fd = 0;
490 u_int nalloc = 0;
490 int wait_status; /* Status returned by wait(). */ 491 int wait_status; /* Status returned by wait(). */
491 pid_t wait_pid; /* pid returned by wait(). */ 492 pid_t wait_pid; /* pid returned by wait(). */
492 int waiting_termination = 0; /* Have displayed waiting close message. */ 493 int waiting_termination = 0; /* Have displayed waiting close message. */
@@ -991,6 +992,17 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
991 listen_address, listen_port, options.gateway_ports); 992 listen_address, listen_port, options.gateway_ports);
992 } 993 }
993 xfree(listen_address); 994 xfree(listen_address);
995 } else if (strcmp(rtype, "cancel-tcpip-forward") == 0) {
996 char *cancel_address;
997 u_short cancel_port;
998
999 cancel_address = packet_get_string(NULL);
1000 cancel_port = (u_short)packet_get_int();
1001 debug("%s: cancel-tcpip-forward addr %s port %d", __func__,
1002 cancel_address, cancel_port);
1003
1004 success = channel_cancel_rport_listener(cancel_address,
1005 cancel_port);
994 } 1006 }
995 if (want_reply) { 1007 if (want_reply) {
996 packet_start(success ? 1008 packet_start(success ?