Skip to content
This repository
Browse code

Cleaned up a few things that I really should have the first time... A…

…nd we don't need that define, we have __FreeBSD__
  • Loading branch information...
commit 8c15d79c7494b8170990dd15bdee6577e17e59c0 1 parent c32f1bf
jercos authored September 13, 2012
1  interface/CMakeLists.txt
@@ -24,7 +24,6 @@ else()
24 24
     add_definitions(-D Illumos=1)
25 25
     set(tunconf TUNConfigurator_Illumos.c)
26 26
   elseif(FREEBSD)
27  
-    add_definitions(-D FreeBSD=1)
28 27
     set(tunconf TUNConfigurator_FreeBSD.c)
29 28
   else()
30 29
     message(FATAL_ERROR "no TUN adapter to handle your system [${CMAKE_SYSTEM_NAME}]")
6  interface/TUNConfigurator_FreeBSD.c
@@ -38,10 +38,7 @@
38 38
 #include <netinet6/nd6.h>
39 39
 #include <sys/errno.h>
40 40
 
41  
-#define APPLE_UTUN_CONTROL "com.apple.net.utun_control"
42  
-#define UTUN_OPT_IFNAME 2
43  
-
44  
-/* Tun Configurator for Apple computers. */
  41
+/* Tun Configurator for FreeBSD. */
45 42
 
46 43
 /**
47 44
  * Open the tun device.
@@ -91,6 +88,7 @@ void* TUNConfigurator_initTun(const char* interfaceName,
91 88
 
92 89
     char* error = NULL;
93 90
 
  91
+    // We want to send IPv6 through our tun device, so we need to be able to specify "ethertype"
94 92
     int tunhead = 1;
95 93
     if (ioctl(tunFd,TUNSIFHEAD,&tunhead) == -1) {
96 94
         error = "TUNSIFHEAD";

0 notes on commit 8c15d79

Please sign in to comment.
Something went wrong with that request. Please try again.