From a0692f497c8d70e72c0acea1cf1f9fcc9ca2afb5 Mon Sep 17 00:00:00 2001 From: KarloX2 <15713553+KarloX2@users.noreply.github.com> Date: Wed, 20 Feb 2019 18:13:07 +0100 Subject: [PATCH] CORE-6004: Add a switch to disable the "TCP Loopback Fast Path" option renamed the new config setting --- builds/install/misc/firebird.conf.in | 2 +- doc/Firebird_conf.txt | 2 +- src/common/config/config.cpp | 6 +++--- src/common/config/config.h | 4 ++-- src/remote/inet.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/builds/install/misc/firebird.conf.in b/builds/install/misc/firebird.conf.in index 556a3a083f..9199fe98ba 100644 --- a/builds/install/misc/firebird.conf.in +++ b/builds/install/misc/firebird.conf.in @@ -774,7 +774,7 @@ # # Type: Boolean, default 1 (true) # -#TcpLoopbackFastPathOption = 1 +#TcpLoopbackFastPath = 1 # # Allows setting of IPV6_V6ONLY socket option. If enabled, IPv6 sockets diff --git a/doc/Firebird_conf.txt b/doc/Firebird_conf.txt index 4d26cb9375..99a485e21f 100644 --- a/doc/Firebird_conf.txt +++ b/doc/Firebird_conf.txt @@ -124,7 +124,7 @@ Only meaningful for Windows SS on SMP systems. OldParameterOrdering boolean default false TcpRemoteBufferSize integer default 8192 (bytes) TcpNoNagle boolean default false -TcpLoopbackFastPathOption boolean default true +TcpLoopbackFastPath boolean default true IpcMapSize integer default 4096 (bytes) DefaultDbCachePages integer default SS: 2048. CS: 75 ConnectionTimeout integer default 180 (seconds) diff --git a/src/common/config/config.cpp b/src/common/config/config.cpp index 70e04b92a7..d43f0d2262 100644 --- a/src/common/config/config.cpp +++ b/src/common/config/config.cpp @@ -148,7 +148,7 @@ const Config::ConfigEntry Config::entries[MAX_CONFIG_KEY] = {TYPE_INTEGER, "CpuAffinityMask", (ConfigValue) 0}, {TYPE_INTEGER, "TcpRemoteBufferSize", (ConfigValue) 8192}, // bytes {TYPE_BOOLEAN, "TcpNoNagle", (ConfigValue) true}, - {TYPE_BOOLEAN, "TcpLoopbackFastPathOption",(ConfigValue) true}, + {TYPE_BOOLEAN, "TcpLoopbackFastPath", (ConfigValue) true}, {TYPE_INTEGER, "DefaultDbCachePages", (ConfigValue) -1}, // pages {TYPE_INTEGER, "ConnectionTimeout", (ConfigValue) 180}, // seconds {TYPE_INTEGER, "DummyPacketInterval", (ConfigValue) 0}, // seconds @@ -493,9 +493,9 @@ bool Config::getTcpNoNagle() const return get(KEY_TCP_NO_NAGLE); } -bool Config::getTcpLoopbackFastPathOption() const +bool Config::getTcpLoopbackFastPath() const { - return get(KEY_TCP_LOOPBACK_FAST_PATH_OPTION); + return get(KEY_TCP_LOOPBACK_FAST_PATH); } bool Config::getIPv6V6Only() const diff --git a/src/common/config/config.h b/src/common/config/config.h index 4cb7bbba33..ca8093f9d1 100644 --- a/src/common/config/config.h +++ b/src/common/config/config.h @@ -95,7 +95,7 @@ public: KEY_CPU_AFFINITY_MASK, KEY_TCP_REMOTE_BUFFER_SIZE, KEY_TCP_NO_NAGLE, - KEY_TCP_LOOPBACK_FAST_PATH_OPTION, + KEY_TCP_LOOPBACK_FAST_PATH, KEY_DEFAULT_DB_CACHE_PAGES, KEY_CONNECTION_TIMEOUT, KEY_DUMMY_PACKET_INTERVAL, @@ -254,7 +254,7 @@ public: bool getTcpNoNagle() const; // Enable or disable the TCP Loopback Fast Path option - bool getTcpLoopbackFastPathOption() const; + bool getTcpLoopbackFastPath() const; // Let IPv6 socket accept only IPv6 packets bool getIPv6V6Only() const; diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index 9918e11e66..a7353cb272 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -3243,7 +3243,7 @@ static bool setNoNagleOption(rem_port* port) bool setFastLoopbackOption(rem_port* port, SOCKET s /*= 0*/) { #ifdef WIN_NT - if (port->getPortConfig()->getTcpLoopbackFastPathOption()) + if (port->getPortConfig()->getTcpLoopbackFastPath()) { if (s == 0) s = port->port_handle;