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

Diff for /src/usr.bin/ssh/clientloop.c between version 1.236 and 1.237

version 1.236, 2011/06/22 22:08:42 version 1.237, 2011/09/10 22:26:34
Line 830 
Line 830 
 {  {
         void (*handler)(int);          void (*handler)(int);
         char *s, *cmd, *cancel_host;          char *s, *cmd, *cancel_host;
         int delete = 0;          int delete = 0, local = 0, remote = 0, dynamic = 0;
         int local = 0, remote = 0, dynamic = 0;          int cancel_port, ok;
         int cancel_port;  
         Forward fwd;          Forward fwd;
   
         bzero(&fwd, sizeof(fwd));          bzero(&fwd, sizeof(fwd));
Line 858 
Line 857 
                     "Request remote forward");                      "Request remote forward");
                 logit("      -D[bind_address:]port                  "                  logit("      -D[bind_address:]port                  "
                     "Request dynamic forward");                      "Request dynamic forward");
                   logit("      -KL[bind_address:]port                 "
                       "Cancel local forward");
                 logit("      -KR[bind_address:]port                 "                  logit("      -KR[bind_address:]port                 "
                     "Cancel remote forward");                      "Cancel remote forward");
                   logit("      -KD[bind_address:]port                 "
                       "Cancel dynamic forward");
                 if (!options.permit_local_command)                  if (!options.permit_local_command)
                         goto out;                          goto out;
                 logit("      !args                                  "                  logit("      !args                                  "
Line 888 
Line 891 
                 goto out;                  goto out;
         }          }
   
         if ((local || dynamic) && delete) {          if (delete && !compat20) {
                 logit("Not supported.");  
                 goto out;  
         }  
         if (remote && delete && !compat20) {  
                 logit("Not supported for SSH protocol version 1.");                  logit("Not supported for SSH protocol version 1.");
                 goto out;                  goto out;
         }          }
Line 915 
Line 914 
                         logit("Bad forwarding close port");                          logit("Bad forwarding close port");
                         goto out;                          goto out;
                 }                  }
                 channel_request_rforward_cancel(cancel_host, cancel_port);                  if (remote)
                           ok = channel_request_rforward_cancel(cancel_host,
                               cancel_port) == 0;
                   else if (dynamic)
                           ok = channel_cancel_lport_listener(cancel_host,
                               cancel_port, 0, options.gateway_ports) > 0;
                   else
                           ok = channel_cancel_lport_listener(cancel_host,
                               cancel_port, CHANNEL_CANCEL_PORT_STATIC,
                               options.gateway_ports) > 0;
                   if (!ok) {
                           logit("Unkown port forwarding.");
                           goto out;
                   }
                   logit("Canceled forwarding.");
         } else {          } else {
                 if (!parse_forward(&fwd, s, dynamic, remote)) {                  if (!parse_forward(&fwd, s, dynamic, remote)) {
                         logit("Bad forwarding specification.");                          logit("Bad forwarding specification.");
Line 936 
Line 949 
                                 goto out;                                  goto out;
                         }                          }
                 }                  }
   
                 logit("Forwarding port.");                  logit("Forwarding port.");
         }          }
   

Legend:
Removed from v.1.236  
changed lines
  Added in v.1.237