From 5b777ad3f5defa9fc10c7a23f824c464bd4eb555 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Fri, 28 Oct 2016 03:10:35 -0700 Subject: [PATCH] minor address macro tweaks --- ext/lwipopts.h | 4 ++-- src/{utils.hpp => sdkutils.hpp} | 0 src/tap.cpp | 2 +- src/tap.hpp | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) rename src/{utils.hpp => sdkutils.hpp} (100%) diff --git a/ext/lwipopts.h b/ext/lwipopts.h index 91dafe0..03409f3 100644 --- a/ext/lwipopts.h +++ b/ext/lwipopts.h @@ -46,10 +46,10 @@ // IPV6 Related //#if defined(SDK_IPV6) - #define LWIP_IPV6 0 + #define LWIP_IPV6 1 //#endif //#if defined(SDK_IPV4) - #define LWIP_IPV4 1 + #define LWIP_IPV4 0 //#endif #define LWIP_TCP 1 diff --git a/src/utils.hpp b/src/sdkutils.hpp similarity index 100% rename from src/utils.hpp rename to src/sdkutils.hpp diff --git a/src/tap.cpp b/src/tap.cpp index 104c9a1..3543fe9 100644 --- a/src/tap.cpp +++ b/src/tap.cpp @@ -36,7 +36,7 @@ #include #include "tap.hpp" -#include "utils.hpp" +#include "sdkutils.hpp" #include "sdk.h" #include "defs.h" #include "debug.h" diff --git a/src/tap.hpp b/src/tap.hpp index 0b9ef02..99d8295 100644 --- a/src/tap.hpp +++ b/src/tap.hpp @@ -497,10 +497,10 @@ namespace ZeroTier { */ void closeConnection(PhySocket *sock); + #if defined(SDK_PICOTCP) ip_addr_t convert_ip(struct sockaddr_in * addr) { ip_addr_t conn_addr; - struct sockaddr_in *ipv4 = addr; short a = ip4_addr1b(&(ipv4->sin_addr)); short b = ip4_addr2b(&(ipv4->sin_addr)); @@ -510,6 +510,7 @@ namespace ZeroTier { return conn_addr; } + #endif Phy _phy; PhySocket *_unixListenSocket;