Bugzilla – Attachment 579 Details for
Bug 756
sshd does not support global request cancel-tcpip-forward
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch with more debugging
chanclosedebug.diff (text/plain), 2.86 KB, created by
Damien Miller
on 2004-03-30 15:58:00 AEST
(
hide
)
Description:
Patch with more debugging
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2004-03-30 15:58:00 AEST
Size:
2.86 KB
patch
obsolete
>? chanclosedebug.diff >? scard/Ssh.bin >? scp/scp >? scp/scp.cat1 >? sftp/sftp >? sftp/sftp.cat1 >? sftp-server/sftp-server >? sftp-server/sftp-server.cat8 >? ssh/ssh >? ssh/ssh.cat1 >? ssh/ssh_config.cat5 >? ssh-add/ssh-add >? ssh-add/ssh-add.cat1 >? ssh-agent/ssh-agent >? ssh-agent/ssh-agent.cat1 >? ssh-keygen/ssh-keygen >? ssh-keygen/ssh-keygen.cat1 >? ssh-keyscan/ssh-keyscan >? ssh-keyscan/ssh-keyscan.cat1 >? ssh-keysign/ssh-keysign >? ssh-keysign/ssh-keysign.cat8 >? sshd/sshd >? sshd/sshd.cat8 >? sshd/sshd_config.cat5 >Index: channels.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/channels.c,v >retrieving revision 1.200 >diff -u -r1.200 channels.c >--- channels.c 19 Jan 2004 09:24:21 -0000 1.200 >+++ channels.c 30 Mar 2004 05:57:15 -0000 >@@ -2218,6 +2218,29 @@ > return success; > } > >+int >+channel_cancel_rport_listener(const char *host, u_short port) >+{ >+ int i, found = 0; >+ >+ for(i = 0; i < channels_alloc; i++) { >+ Channel *c = channels[i]; >+ >+ if (c != NULL && c->type == SSH_CHANNEL_RPORT_LISTENER) { >+ debug3("Channel %d %s:%d vs close msg %s:%d", >+ c->self, c->path, c->host_port, host, port); >+ if (strncmp(c->path, host, sizeof(c->path)) == 0 && >+ c->host_port == port) { >+ debug2("%s: close clannel %d", __func__, i); >+ channel_free(c); >+ found = 1; >+ } >+ } >+ } >+ >+ return (found); >+} >+ > /* protocol local port fwd, used by ssh (and sshd in v1) */ > int > channel_setup_local_fwd_listener(u_short listen_port, >Index: channels.h >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/channels.h,v >retrieving revision 1.71 >diff -u -r1.71 channels.h >--- channels.h 23 Sep 2003 20:41:11 -0000 1.71 >+++ channels.h 30 Mar 2004 05:57:15 -0000 >@@ -201,6 +201,7 @@ > void channel_request_remote_forwarding(u_short, const char *, u_short); > int channel_setup_local_fwd_listener(u_short, const char *, u_short, int); > int channel_setup_remote_fwd_listener(const char *, u_short, int); >+int channel_cancel_rport_listener(const char *, u_short); > > /* x11 forwarding */ > >Index: serverloop.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/serverloop.c,v >retrieving revision 1.115 >diff -u -r1.115 serverloop.c >--- serverloop.c 19 Jan 2004 21:25:15 -0000 1.115 >+++ serverloop.c 30 Mar 2004 05:57:15 -0000 >@@ -986,6 +986,17 @@ > listen_address, listen_port, options.gateway_ports); > } > xfree(listen_address); >+ } else if (strcmp(rtype, "cancel-tcpip-forward") == 0) { >+ char *cancel_address; >+ u_short cancel_port; >+ >+ cancel_address = packet_get_string(NULL); >+ cancel_port = (u_short)packet_get_int(); >+ debug("server_input_global_request: cancel-tcpip-forward addr %s port %d", >+ cancel_address, cancel_port); >+ >+ success = channel_cancel_rport_listener(cancel_address, >+ cancel_port); > } > if (want_reply) { > packet_start(success ?
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 756
:
494
|
505
|
579
|
580