From 9a97cc5cfdaa6a76ab50a6a98aa082656328b858 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Tue, 18 Apr 2006 22:24:14 +0000 Subject: [PATCH] placate valgrind + protect powerdns against non-IN queries, we don't deal well with them, hand out SERVFAIL immediately git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@732 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/pdns_recursor.cc | 1 - pdns/syncres.cc | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index c5a1fa300..f8cfa9002 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -747,7 +747,6 @@ void makeTCPServerSockets() ComboAddress sin; for(vector::const_iterator i=locals.begin();i!=locals.end();++i) { memset((char *)&sin,0, sizeof(sin)); - ComboAddress sin; sin.sin4.sin_family = AF_INET; if(!IpToU32(*i, &sin.sin4.sin_addr.s_addr)) { sin.sin6.sin6_family = AF_INET6; diff --git a/pdns/syncres.cc b/pdns/syncres.cc index f13d0a953..52180b40b 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -89,7 +89,10 @@ int SyncRes::beginResolve(const string &qname, const QType &qtype, uint16_t qcla ret.push_back(rr); return 0; } - + + if(qclass!=1) + return -1; + set beenthere; int res=doResolve(qname, qtype, ret,0,beenthere); if(!res) -- 2.49.0