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

Diff for /src/usr.bin/ssh/misc.c between version 1.114 and 1.115

version 1.114, 2017/10/21 23:06:24 version 1.115, 2017/10/23 05:08:00
Line 944 
Line 944 
 }  }
   
 int  int
 tun_open(int tun, int mode)  tun_open(int tun, int mode, char **ifname)
 {  {
         struct ifreq ifr;          struct ifreq ifr;
         char name[100];          char name[100];
         int fd = -1, sock;          int fd = -1, sock;
         const char *tunbase = "tun";          const char *tunbase = "tun";
   
           if (ifname != NULL)
                   *ifname = NULL;
   
         if (mode == SSH_TUNMODE_ETHERNET)          if (mode == SSH_TUNMODE_ETHERNET)
                 tunbase = "tap";                  tunbase = "tap";
   
Line 996 
Line 999 
                         goto failed;                          goto failed;
                 }                  }
         }          }
   
           if (ifname != NULL)
                   *ifname = xstrdup(ifr.ifr_name);
   
         close(sock);          close(sock);
         return fd;          return fd;

Legend:
Removed from v.1.114  
changed lines
  Added in v.1.115