]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Christof Meerwald discovered we checked if the remote host in 'pdns_control notify...
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 28 Aug 2012 21:19:40 +0000 (21:19 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 28 Aug 2012 21:19:40 +0000 (21:19 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2704 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dynhandler.cc

index 1b0fbe2a0e604cb038664772d7c462c6fcd9051d..141ed1bec28cfdcc9e3d5b77faa4941f320546fe 100644 (file)
@@ -217,10 +217,13 @@ string DLNotifyHostHandler(const vector<string>&parts, Utility::pid_t ppid)
   if(!::arg().mustDo("master"))
       return "PowerDNS not configured as master";
 
-  struct in_addr inp;
-  if(!Utility::inet_aton(parts[2].c_str(),&inp))
+  try {
+    ComboAddress ca(parts[2]);
+  } catch(...)
+  {
     return "Unable to convert '"+parts[2]+"' to an IP address";
-
+  }
+  
   L<<Logger::Warning<<"Notification request to host "<<parts[2]<<" for domain '"<<parts[1]<<"' received"<<endl;
   Communicator.notify(parts[1],parts[2]);
   return "Added to queue";