]> granicus.if.org Git - pdns/commitdiff
Remove NetmaskTree#[] from geoipbackend
authorAki Tuomi <cmouse@desteem.org>
Sun, 29 Nov 2015 09:49:14 +0000 (11:49 +0200)
committerAki Tuomi <cmouse@desteem.org>
Sun, 29 Nov 2015 09:49:14 +0000 (11:49 +0200)
modules/geoipbackend/geoipbackend.cc

index 787bf8acab2c8efb890dd2e97fddb68f39e63c58..eee816199694dc013a09fb99afe6d6aede1e7acc 100644 (file)
@@ -147,10 +147,10 @@ void GeoIPBackend::initialize() {
             value.push_back(net->second.as<string>());
           }
           if (net->first.as<string>() == "default") {
-            nmt[Netmask("0.0.0.0/0")].assign(value.begin(),value.end());
-            nmt[Netmask("::/0")].swap(value);
+            nmt.insert(Netmask("0.0.0.0/0")).second.assign(value.begin(),value.end());
+            nmt.insert(Netmask("::/0")).second.swap(value);
           } else {
-            nmt[Netmask(net->first.as<string>())].swap(value);
+            nmt.insert(Netmask(net->first.as<string>())).second.swap(value);
           }
         }
       } else {
@@ -160,8 +160,8 @@ void GeoIPBackend::initialize() {
         } else {
           value.push_back(service->second.as<string>());
         }
-        nmt[Netmask("0.0.0.0/0")].assign(value.begin(),value.end());
-        nmt[Netmask("::/0")].swap(value);
+        nmt.insert(Netmask("0.0.0.0/0")).second.assign(value.begin(),value.end());
+        nmt.insert(Netmask("::/0")).second.swap(value);
       }
       dom.services[DNSName(service->first.as<string>())].swap(nmt);
     }