{"action":"opened","issue":{"url":"https://api.github.com/repos/PowerDNS/pdns/issues/3646","repository_url":"https://api.github.com/repos/PowerDNS/pdns","labels_url":"https://api.github.com/repos/PowerDNS/pdns/issues/3646/labels{/name}","comments_url":"https://api.github.com/repos/PowerDNS/pdns/issues/3646/comments","events_url":"https://api.github.com/repos/PowerDNS/pdns/issues/3646/events","html_url":"https://github.com/PowerDNS/pdns/issues/3646","id":145176046,"number":3646,"title":"Strange behavior in CommunicatorClass::queueNotifyDomain 3.4.8","user":{"login":"klaus3000","id":6066020,"avatar_url":"https://avatars.githubusercontent.com/u/6066020?v=3","gravatar_id":"","url":"https://api.github.com/users/klaus3000","html_url":"https://github.com/klaus3000","followers_url":"https://api.github.com/users/klaus3000/followers","following_url":"https://api.github.com/users/klaus3000/following{/other_user}","gists_url":"https://api.github.com/users/klaus3000/gists{/gist_id}","starred_url":"https://api.github.com/users/klaus3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klaus3000/subscriptions","organizations_url":"https://api.github.com/users/klaus3000/orgs","repos_url":"https://api.github.com/users/klaus3000/repos","events_url":"https://api.github.com/users/klaus3000/events{/privacy}","received_events_url":"https://api.github.com/users/klaus3000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-01T13:04:25Z","updated_at":"2016-04-01T13:04:25Z","closed_at":null,"body":"Hi!\r\n\r\nI added some log messages to the NOTIFY logic and I think I found a bug:\r\n\r\n    B->lookup(QType(QType::NS),domain);\r\n    while(B->get(rr))\r\n      nsset.insert(rr.content);\r\nL<<Logger::Warning<<\"Found \"<<nsset.size()<<\" NS records\"<<endl;\r\n\r\n    for(set<string>::const_iterator j=nsset.begin();j!=nsset.end();++j) {\r\n      vector<string> nsips=fns.lookup(*j, B);\r\nL<<Logger::Warning<<\"Found \"<<nsips.size()<<\" IPs for NS records\"<<endl;\r\n      if(nsips.empty())\r\n        L<<Logger::Warning<<\"Unable to queue notification of domain '\"<<domain<<\"': nameservers do not resolve!\"<<endl;\r\n      else\r\n        for(vector<string>::const_iterator k=nsips.begin();k!=nsips.end();++k) {\r\n          const ComboAddress caIp(*k, 53);\r\n          if(!d_preventSelfNotification || !AddressIsUs(caIp)) {\r\n            if(!d_onlyNotify.match(&caIp))\r\n              L<<Logger::Info<<\"Skiped notification of domain '\"<<domain<<\"' to \"<<*j<<\" because it does not match only-notify.\"<<endl;\r\n            else\r\n{\r\nL<<Logger::Warning<<\"Inserting to ips: \"<<caIp.toStringWithPort()<<\" \"<<endl;\r\n              ips.insert(caIp.toStringWithPort());\r\n}\r\n          }\r\n        }\r\n    }\r\n\r\n\r\nAnd the result looks strange. The zone tld-box.com has 4 NS records. But the logic detects for every NS record 4 IP addresses, although there is only 1 IP per NS record:\r\n\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: AXFR done for 'tld-box.com', zone committed with serial number 264\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: gpgsql Connection successful. Connected to database 'regdns' on 'localhost'.\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Found 4 NS records\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Found 4 IPs for NS records\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: [2a02:850:4:3::14]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: [2a02:850:4:3::14]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: [2a02:850:4:3::14]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: [2a02:850:4:3::14]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Found 4 IPs for NS records\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: 83.136.32.80:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: 83.136.32.80:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: 83.136.32.80:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: 83.136.32.80:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Found 4 IPs for NS records\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: [2a02:850:4:3::15]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: [2a02:850:4:3::15]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: [2a02:850:4:3::15]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: [2a02:850:4:3::15]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Found 4 IPs for NS records\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: 83.136.32.81:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: 83.136.32.81:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: 83.136.32.81:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Inserting to ips: 83.136.32.81:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Queued notification of domain 'tld-box.com' to 83.136.32.80:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Queued notification of domain 'tld-box.com' to 83.136.32.81:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Queued notification of domain 'tld-box.com' to [2a02:850:4:3::14]:53\r\nApr  1 13:01:33 cc-regdev-sbg1 pdns[21086]: Queued notification of domain 'tld-box.com' to [2a02:850:4:3::15]:53\r\n\r\nI am not a C++ guy, but this looks strange. I would expect only 1 IP per NS iteration.\r\n"}}