From 6a1049bfb7d26fe58c32a5f1e12b3c58b67cc85e Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 22 Jul 2016 10:34:56 -0400 Subject: [PATCH] override address if v6 only --- RouterContext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RouterContext.cpp b/RouterContext.cpp index 0140c298..f2c2bc48 100644 --- a/RouterContext.cpp +++ b/RouterContext.cpp @@ -67,7 +67,9 @@ namespace i2p if (ipv6) { std::string host = "::"; - if (!ifname.empty()) + if (!i2p::config::IsDefault("host") && !ipv4) // override if v6 only + i2p::config::GetOption("host", host); + else if (!ifname.empty()) host = i2p::util::net::GetInterfaceAddress(ifname, true).to_string(); // v6 routerInfo.AddSSUAddress (host.c_str(), port, routerInfo.GetIdentHash ()); routerInfo.AddNTCPAddress (host.c_str(), port);