From: Bert Hubert Date: Tue, 28 Aug 2012 21:19:40 +0000 (+0000) Subject: Christof Meerwald discovered we checked if the remote host in 'pdns_control notify... X-Git-Tag: auth-3.2-rc1~178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c069c1f26539f8c36e143e4222ce13f23ae4db31;p=thirdparty%2Fpdns.git Christof Meerwald discovered we checked if the remote host in 'pdns_control notify-host' was valid, but would only accept IPv4 addresses! git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2704 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dynhandler.cc b/pdns/dynhandler.cc index 1b0fbe2a0e..141ed1bec2 100644 --- a/pdns/dynhandler.cc +++ b/pdns/dynhandler.cc @@ -217,10 +217,13 @@ string DLNotifyHostHandler(const vector&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<