/[pengfork]/pengfork/src/tun/openbsd/tun.c
ViewVC logotype

Diff of /pengfork/src/tun/openbsd/tun.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by chupa, Fri Sep 6 23:03:55 2002 UTC revision 1.3 by chupa, Tue Nov 26 01:22:31 2002 UTC
# Line 40  Line 40 
40  #include <netinet/ip.h>  #include <netinet/ip.h>
41    
42  #include "options.h"  #include "options.h"
43    #include "log.h"
44  #include "tun/tun.h"  #include "tun/tun.h"
45    
46  extern int tun_fd;  extern int tun_fd;
# Line 68  tun_open () Line 69  tun_open ()
69              }              }
70          }          }
71      }      }
72    return tun_ready ();  
73      if(!tun_ready ())
74        {
75          if (PARAM_INTERFACE_NAME)
76            {      
77            log(LOG_ERR, "Unable to open tun device /dev/%s: %s(%d).\n",
78                PARAM_INTERFACE_NAME, strerror(errno), errno);
79            }
80          else
81            {
82            log(LOG_ERR, "Unable to open a valid tun device.\n");
83            }
84          return 0;
85        }
86      
87      return 1;
88  }  }
89    
90  int  int

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26