]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
iputils.hh: NetmaskTree: Make the node_type key value const. 8355/head
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 9 Oct 2019 00:06:33 +0000 (02:06 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 11 Feb 2020 19:54:03 +0000 (20:54 +0100)
This prevents changing the key used by the tree, which would otherwise provide
an opportunity to corrupt the tree.

pdns/iputils.hh

index 69c9a9ec8e15cf528515de0292893d01929641fc..97ef03855f266ea0cfddf5af1f2672fd1ba31474 100644 (file)
@@ -650,7 +650,7 @@ public:
 
   typedef Netmask key_type;
   typedef T value_type;
-  typedef std::pair<key_type,value_type> node_type;
+  typedef std::pair<const key_type,value_type> node_type;
   typedef size_t size_type;
   typedef class Iterator iterator;