Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 jercos authored
Showing with 2 additions and 5 deletions.
  1. +0 −1  interface/CMakeLists.txt
  2. +2 −4 interface/TUNConfigurator_FreeBSD.c
View
1  interface/CMakeLists.txt
@@ -24,7 +24,6 @@ else()
add_definitions(-D Illumos=1)
set(tunconf TUNConfigurator_Illumos.c)
elseif(FREEBSD)
- add_definitions(-D FreeBSD=1)
set(tunconf TUNConfigurator_FreeBSD.c)
else()
message(FATAL_ERROR "no TUN adapter to handle your system [${CMAKE_SYSTEM_NAME}]")
View
6 interface/TUNConfigurator_FreeBSD.c
@@ -38,10 +38,7 @@
#include <netinet6/nd6.h>
#include <sys/errno.h>
-#define APPLE_UTUN_CONTROL "com.apple.net.utun_control"
-#define UTUN_OPT_IFNAME 2
-
-/* Tun Configurator for Apple computers. */
+/* Tun Configurator for FreeBSD. */
/**
* Open the tun device.
@@ -91,6 +88,7 @@ void* TUNConfigurator_initTun(const char* interfaceName,
char* error = NULL;
+ // We want to send IPv6 through our tun device, so we need to be able to specify "ethertype"
int tunhead = 1;
if (ioctl(tunFd,TUNSIFHEAD,&tunhead) == -1) {
error = "TUNSIFHEAD";
Please sign in to comment.
Something went wrong with that request. Please try again.