From: Aki Tuomi Date: Fri, 20 Jun 2014 07:27:55 +0000 (+0300) Subject: Closes #1482, use getRealRemote instead of getRemote to support EDNS X-Git-Tag: auth-3.4.0-rc1~129^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1483%2Fhead;p=thirdparty%2Fpdns.git Closes #1482, use getRealRemote instead of getRemote to support EDNS --- diff --git a/modules/geobackend/geobackend.cc b/modules/geobackend/geobackend.cc index c3d27b2ed1..287db2face 100644 --- a/modules/geobackend/geobackend.cc +++ b/modules/geobackend/geobackend.cc @@ -188,11 +188,11 @@ void GeoBackend::answerGeoRecord(const QType &qtype, const string &qdomain, DNSP short isocode = 0; if (p != NULL && ipt != NULL) { try { - isocode = ipt->lookup(p->getRemote()); + isocode = ipt->lookup(p->getRealRemote().toString()); } catch(ParsePrefixException &e) { // Ignore L << Logger::Notice << logprefix << "Unable to parse IP '" - << p->getRemote() << " as IPv4 prefix" << endl; + << p->getRealRemote().toString() << " as IPv4 prefix" << endl; } } @@ -202,7 +202,7 @@ void GeoBackend::answerGeoRecord(const QType &qtype, const string &qdomain, DNSP L << Logger::Debug << logprefix << "Serving " << qdomain << " " << rr->qtype.getName() << " " << target << " to " - << (p != NULL ? p->getRemote() : "(unknown)") + << (p != NULL ? p->getRealRemote().toString() : "(unknown)") << " (" << isocode << ")" << endl; answers.push_back(rr); @@ -212,7 +212,7 @@ void GeoBackend::answerLocalhostRecord(const string &qdomain, DNSPacket *p) { short isocode = 0; if (p != NULL) { try { - isocode = ipt->lookup(p->getRemote()); + isocode = ipt->lookup(p->getRealRemote().toString()); } catch(ParsePrefixException &e) {} // Ignore }