]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Faster lookups in MaxQPSIPRule()
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Feb 2023 15:24:22 +0000 (16:24 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Feb 2023 15:24:22 +0000 (16:24 +0100)
pdns/dnsdistdist/dnsdist-rules.hh

index c452f9d346db94a4df1116e08b17ba36f08b49de..b89d9df3ca072fcf14ce88ca5e802bfbe68bc22f 100644 (file)
@@ -136,7 +136,7 @@ public:
   }
 
 private:
-  struct OrderedTag {};
+  struct HashedTag {};
   struct SequencedTag {};
   struct Entry
   {
@@ -150,7 +150,7 @@ private:
   typedef multi_index_container<
     Entry,
     indexed_by <
-      ordered_unique<tag<OrderedTag>, member<Entry,ComboAddress,&Entry::d_addr>, ComboAddress::addressOnlyLessThan >,
+      hashed_unique<tag<HashedTag>, member<Entry,ComboAddress,&Entry::d_addr>, ComboAddress::addressOnlyHash >,
       sequenced<tag<SequencedTag> >
       >
   > qpsContainer_t;