aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-05-13 00:40:30 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-05-13 01:12:24 +0200
commitea933b03b4d75a19a8d30a90796861721445a6b6 (patch)
treeb5f2225809368babe0d6d9e2dc5f602e1ef7daf5 /src/netbase.cpp
parenta6cd0b08f6ef2af86fdff01154fe647e40b95424 (diff)
use "IPv6" and "IPv4" in strings as these are the official spellings and make ParseNetwork() in netbase.cpp case-insensitive
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index ebf823e899..0ba8edfc4e 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -11,6 +11,7 @@
#endif
#include "strlcpy.h"
+#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
using namespace std;
@@ -27,6 +28,7 @@ static bool vfNoProxy[NET_MAX] = {};
static const unsigned char pchIPv4[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff };
enum Network ParseNetwork(std::string net) {
+ boost::to_lower(net);
if (net == "ipv4") return NET_IPV4;
if (net == "ipv6") return NET_IPV6;
if (net == "tor") return NET_TOR;