7f671d2b95
PR: ports/119449 Submitted by: bz@ (maintainer)
28 lines
867 B
Text
28 lines
867 B
Text
--- tuntap.c.orig Sun Dec 11 16:44:16 2005
|
|
+++ tuntap.c Wed Jan 25 20:05:14 2006
|
|
@@ -159,6 +159,25 @@ int TUNTAP_CreateInterface(
|
|
strcpy( pszNetDevName, ifr.ifr_name );
|
|
}
|
|
#if !defined( OPTION_W32_CTCI )
|
|
+ else if ( strncasecmp( utsbuf.sysname, "FreeBSD", 7 ) == 0 )
|
|
+ {
|
|
+ struct stat sb;
|
|
+
|
|
+ if ( ( iFlags & IFF_TAP ) == IFF_TAP )
|
|
+ {
|
|
+ logmsg( _("HHCTU011E TAP device not yet supported\n") );
|
|
+ return -1;
|
|
+ }
|
|
+
|
|
+ if ( fstat(fd, &sb) == 0 )
|
|
+ devname_r(sb.st_rdev, S_IFCHR, pszNetDevName, IFNAMSIZ);
|
|
+ else
|
|
+ {
|
|
+ logmsg( _("HHCTU010E Error getting TUN/TAP device name: %s\n"),
|
|
+ strerror( errno ) );
|
|
+ return -1;
|
|
+ }
|
|
+ }
|
|
else
|
|
{
|
|
// Other OS: Simply use basename of the device
|