]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Ignore port numbers in removeIf() if either ComboAddress lacks one. 16902/head
authorMiod Vallat <miod.vallat@powerdns.com>
Wed, 18 Feb 2026 07:13:22 +0000 (08:13 +0100)
committerMiod Vallat <miod.vallat@powerdns.com>
Wed, 18 Feb 2026 08:53:49 +0000 (09:53 +0100)
Fixes: #13576
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/communicator.hh

index f75f484b6e2cb12d0454ff27328d641fca685617..3e27c7aa43e965d6282eea0d02c2f3825c3975bf 100644 (file)
@@ -78,7 +78,7 @@ class NotificationQueue
 public:
   void add(const ZoneName& domain, const string& ipstring, time_t delay = 0)
   {
-    const ComboAddress ipaddress(ipstring);
+    const ComboAddress ipaddress(ipstring); // may not contain a port number
     add(domain, ipaddress, delay);
   }
 
@@ -98,7 +98,7 @@ public:
   {
     for (auto i = d_nqueue.begin(); i != d_nqueue.end(); ++i) {
       ComboAddress stQueued{i->ip};
-      if (i->id == id && stQueued == remote && i->domain == domain) {
+      if (i->id == id && ComboAddress::addressOnlyEqual()(stQueued, remote) && i->domain == domain) {
         d_nqueue.erase(i);
         return true;
       }