~ubuntu-branches/ubuntu/maverick/pdns/maverick-updates

« back to all changes in this revision

Viewing changes to pdns/dnsbackend.cc

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Mohlmann, Matthijs Mohlmann, Christoph Haas
  • Date: 2007-04-15 23:23:39 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070415232339-5x3scc8gx04e50um
Tags: 2.9.21-1
[ Matthijs Mohlmann ]
* New upstream release. (Closes: #420294)
* Remove meta pdns package.
* Added new sqlite3 backend package.
* Months and minutes where mixed up. (Closes: #406462)
* Case sensitivity in bind backend caused PowerDNS to not serve a certain
  zone. (Closes: #406461)
* Bind backend forgot about zones on a notify. (Closes: #398213)

[ Christoph Haas ]
* Documented incorporated backend bind. (Closes: #415471)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
    Copyright (C) 2005  PowerDNS.COM BV
4
4
 
5
5
    This program is free software; you can redistribute it and/or modify
6
 
    it under the terms of the GNU General Public License as published by
7
 
    the Free Software Foundation; either version 2 of the License, or
8
 
    (at your option) any later version.
 
6
    it under the terms of the GNU General Public License version 2
 
7
    as published by the Free Software Foundation
 
8
    
9
9
 
10
10
    This program is distributed in the hope that it will be useful,
11
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
 
15
15
    You should have received a copy of the GNU General Public License
16
16
    along with this program; if not, write to the Free Software
17
 
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
*/
19
19
#include "utility.hh"
20
20
#include "dnsbackend.hh"
32
32
 
33
33
bool DNSBackend::getRemote(DNSPacket *p, struct sockaddr *sa, Utility::socklen_t *len)
34
34
{
35
 
  if(p->d_socklen<*len)
 
35
  if(p->remote.getSocklen() < *len)
36
36
    return false;
37
 
  *len=p->d_socklen;
 
37
  *len=p->remote.getSocklen();
38
38
  memcpy(sa,&p->remote,*len);
39
39
  return true;
40
40
}
41
41
 
42
 
 
43
 
 
44
42
void DNSBackend::setArgPrefix(const string &prefix)
45
43
{
46
44
  d_prefix=prefix;
215
213
 
216
214
  while(this->get(rr)) {
217
215
    hits++;
218
 
    DNSPacket::fillSOAData(rr.content, sd);
 
216
    fillSOAData(rr.content, sd);
219
217
    sd.domain_id=rr.domain_id;
220
218
    sd.ttl=rr.ttl;
221
219
  }