[BACK]Return to ssh.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh.c between version 1.365 and 1.366

version 1.365, 2011/09/09 22:46:44 version 1.366, 2011/09/23 07:45:05
Line 970 
Line 970 
         debug("remote forward %s for: listen %d, connect %s:%d",          debug("remote forward %s for: listen %d, connect %s:%d",
             type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure",              type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure",
             rfwd->listen_port, rfwd->connect_host, rfwd->connect_port);              rfwd->listen_port, rfwd->connect_host, rfwd->connect_port);
         if (type == SSH2_MSG_REQUEST_SUCCESS && rfwd->listen_port == 0) {          if (rfwd->listen_port == 0) {
                 rfwd->allocated_port = packet_get_int();                  if (type == SSH2_MSG_REQUEST_SUCCESS) {
                 logit("Allocated port %u for remote forward to %s:%d",                          rfwd->allocated_port = packet_get_int();
                     rfwd->allocated_port,                          logit("Allocated port %u for remote forward to %s:%d",
                     rfwd->connect_host, rfwd->connect_port);                              rfwd->allocated_port,
                               rfwd->connect_host, rfwd->connect_port);
                           channel_update_permitted_opens(rfwd->handle,
                               rfwd->allocated_port);
                   } else {
                           channel_update_permitted_opens(rfwd->handle, -1);
                   }
         }          }
   
         if (type == SSH2_MSG_REQUEST_FAILURE) {          if (type == SSH2_MSG_REQUEST_FAILURE) {
Line 1066 
Line 1072 
                     options.remote_forwards[i].listen_port,                      options.remote_forwards[i].listen_port,
                     options.remote_forwards[i].connect_host,                      options.remote_forwards[i].connect_host,
                     options.remote_forwards[i].connect_port);                      options.remote_forwards[i].connect_port);
                 if (channel_request_remote_forwarding(                  options.remote_forwards[i].handle =
                       channel_request_remote_forwarding(
                     options.remote_forwards[i].listen_host,                      options.remote_forwards[i].listen_host,
                     options.remote_forwards[i].listen_port,                      options.remote_forwards[i].listen_port,
                     options.remote_forwards[i].connect_host,                      options.remote_forwards[i].connect_host,
                     options.remote_forwards[i].connect_port) < 0) {                      options.remote_forwards[i].connect_port);
                   if (options.remote_forwards[i].handle < 0) {
                         if (options.exit_on_forward_failure)                          if (options.exit_on_forward_failure)
                                 fatal("Could not request remote forwarding.");                                  fatal("Could not request remote forwarding.");
                         else                          else
                                 logit("Warning: Could not request remote "                                  logit("Warning: Could not request remote "
                                     "forwarding.");                                      "forwarding.");
                   } else {
                           client_register_global_confirm(ssh_confirm_remote_forward,
                               &options.remote_forwards[i]);
                 }                  }
                 client_register_global_confirm(ssh_confirm_remote_forward,  
                     &options.remote_forwards[i]);  
         }          }
   
         /* Initiate tunnel forwarding. */          /* Initiate tunnel forwarding. */

Legend:
Removed from v.1.365  
changed lines
  Added in v.1.366