From 70dca81c408ba5474414859a71c2c59048b38fd6 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Thu, 24 Mar 2022 01:33:52 +0300 Subject: [PATCH] dropped MESHNET build option Dropping MESHNET build option due to lack of usage. That change won't affect on usage with currently supported Yggdrasil network. Signed-off-by: R4SAS --- Makefile | 5 ----- build/CMakeLists.txt | 16 ---------------- daemon/Daemon.cpp | 6 +----- debian/patches/02-upnp.patch | 6 +++--- libi2pd/SSUData.h | 4 ---- libi2pd/version.h | 4 ---- 6 files changed, 4 insertions(+), 37 deletions(-) diff --git a/Makefile b/Makefile index 5d2f24f4..e9bd9187 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,6 @@ include filelist.mk USE_AESNI := $(or $(USE_AESNI),yes) USE_STATIC := $(or $(USE_STATIC),no) -USE_MESHNET := $(or $(USE_MESHNET),no) USE_UPNP := $(or $(USE_UPNP),no) DEBUG := $(or $(DEBUG),yes) @@ -68,10 +67,6 @@ else # not supported $(error Not supported platform) endif -ifeq ($(USE_MESHNET),yes) - NEEDED_CXXFLAGS += -DMESHNET -endif - ifeq ($(USE_GIT_VERSION),yes) GIT_VERSION := $(shell git describe --tags) NEEDED_CXXFLAGS += -DGITVER=\"$(GIT_VERSION)\" diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index ba141ac4..cf0416cd 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -17,7 +17,6 @@ option(WITH_LIBRARY "Build library" ON) option(WITH_BINARY "Build binary" ON) option(WITH_STATIC "Static build" OFF) option(WITH_UPNP "Include support for UPnP client" OFF) -option(WITH_MESHNET "Build for cjdns test network" OFF) option(WITH_ADDRSANITIZER "Build with address sanitizer unix only" OFF) option(WITH_THREADSANITIZER "Build with thread sanitizer unix only" OFF) @@ -89,10 +88,6 @@ set(DAEMON_SRC "${DAEMON_SRC_DIR}/UPnP.cpp" ) -if(WITH_MESHNET) - add_definitions(-DMESHNET) -endif() - if(WITH_UPNP) add_definitions(-DUSE_UPNP) endif() @@ -235,12 +230,6 @@ endif() # load includes include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) -# warn if for meshnet -if(WITH_MESHNET) - message(STATUS "Building for testnet") - message(WARNING "This build will NOT work on mainline i2p") -endif() - include(CheckAtomic) # show summary @@ -258,15 +247,10 @@ message(STATUS " LIBRARY : ${WITH_LIBRARY}") message(STATUS " BINARY : ${WITH_BINARY}") message(STATUS " STATIC BUILD : ${WITH_STATIC}") message(STATUS " UPnP : ${WITH_UPNP}") -message(STATUS " MESHNET : ${WITH_MESHNET}") message(STATUS " ADDRSANITIZER : ${WITH_ADDRSANITIZER}") message(STATUS " THREADSANITIZER : ${WITH_THREADSANITIZER}") message(STATUS "---------------------------------------") -if(WITH_MESHNET) - message(STATUS "WARNING: Using the MESHNET option will make it impossible to use the application with the main network!!!") -endif() - if(WITH_BINARY) add_executable("${PROJECT_NAME}" ${DAEMON_SRC}) diff --git a/daemon/Daemon.cpp b/daemon/Daemon.cpp index 2f1f7bcb..4cee3e9b 100644 --- a/daemon/Daemon.cpp +++ b/daemon/Daemon.cpp @@ -151,11 +151,7 @@ namespace util bool ipv6; i2p::config::GetOption("ipv6", ipv6); bool ipv4; i2p::config::GetOption("ipv4", ipv4); -#ifdef MESHNET - // manual override for meshnet - ipv4 = false; - ipv6 = true; -#endif + // ifname -> address std::string ifname; i2p::config::GetOption("ifname", ifname); if (ipv4 && i2p::config::IsDefault ("address4")) diff --git a/debian/patches/02-upnp.patch b/debian/patches/02-upnp.patch index 99698737..bec8f2b0 100644 --- a/debian/patches/02-upnp.patch +++ b/debian/patches/02-upnp.patch @@ -2,14 +2,14 @@ Description: Enable UPnP usage in package Author: r4sas Reviewed-By: r4sas -Last-Update: 2021-10-22 +Last-Update: 2022-03-23 --- i2pd.orig/Makefile +++ i2pd/Makefile -@@ -32,7 +32,7 @@ include filelist.mk +@@ -31,7 +31,7 @@ include filelist.mk + USE_AESNI := $(or $(USE_AESNI),yes) USE_STATIC := $(or $(USE_STATIC),no) - USE_MESHNET := $(or $(USE_MESHNET),no) -USE_UPNP := $(or $(USE_UPNP),no) +USE_UPNP := $(or $(USE_UPNP),yes) DEBUG := $(or $(DEBUG),yes) diff --git a/libi2pd/SSUData.h b/libi2pd/SSUData.h index 2492c89e..1746dcd8 100644 --- a/libi2pd/SSUData.h +++ b/libi2pd/SSUData.h @@ -26,11 +26,7 @@ namespace transport { const size_t SSU_MTU_V4 = 1484; - #ifdef MESHNET - const size_t SSU_MTU_V6 = 1286; - #else const size_t SSU_MTU_V6 = 1488; - #endif const size_t IPV4_HEADER_SIZE = 20; const size_t IPV6_HEADER_SIZE = 40; const size_t UDP_HEADER_SIZE = 8; diff --git a/libi2pd/version.h b/libi2pd/version.h index 91228f68..3085d880 100644 --- a/libi2pd/version.h +++ b/libi2pd/version.h @@ -27,11 +27,7 @@ #define VERSION I2PD_VERSION -#ifdef MESHNET -#define I2PD_NET_ID 3 -#else #define I2PD_NET_ID 2 -#endif #define I2P_VERSION_MAJOR 0 #define I2P_VERSION_MINOR 9