[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.305 and 1.306

version 1.305, 2017/09/19 04:24:22 version 1.306, 2017/10/23 05:08:00
Line 1592 
Line 1592 
         return c;          return c;
 }  }
   
 int  char *
 client_request_tun_fwd(struct ssh *ssh, int tun_mode,  client_request_tun_fwd(struct ssh *ssh, int tun_mode,
     int local_tun, int remote_tun)      int local_tun, int remote_tun)
 {  {
         Channel *c;          Channel *c;
         int fd;          int fd;
           char *ifname = NULL;
   
         if (tun_mode == SSH_TUNMODE_NO)          if (tun_mode == SSH_TUNMODE_NO)
                 return 0;                  return 0;
Line 1605 
Line 1606 
         debug("Requesting tun unit %d in mode %d", local_tun, tun_mode);          debug("Requesting tun unit %d in mode %d", local_tun, tun_mode);
   
         /* Open local tunnel device */          /* Open local tunnel device */
         if ((fd = tun_open(local_tun, tun_mode)) == -1) {          if ((fd = tun_open(local_tun, tun_mode, &ifname)) == -1) {
                 error("Tunnel device open failed.");                  error("Tunnel device open failed.");
                 return -1;                  return NULL;
         }          }
           debug("Tunnel forwarding using interface %s", ifname);
   
         c = channel_new(ssh, "tun", SSH_CHANNEL_OPENING, fd, fd, -1,          c = channel_new(ssh, "tun", SSH_CHANNEL_OPENING, fd, fd, -1,
             CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);              CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
Line 1623 
Line 1625 
         packet_put_int(remote_tun);          packet_put_int(remote_tun);
         packet_send();          packet_send();
   
         return 0;          return ifname;
 }  }
   
 /* XXXX move to generic input handler */  /* XXXX move to generic input handler */

Legend:
Removed from v.1.305  
changed lines
  Added in v.1.306