Changeset 1017
- Timestamp:
- 04/07/07 20:07:59 (2 years ago)
- Files:
-
- trunk/pdns/pdns/backends/bind/bindparser.yy (modified) (1 diff)
- trunk/pdns/pdns/communicator.cc (modified) (4 diffs)
- trunk/pdns/pdns/docs/pdns.sgml (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pdns/pdns/backends/bind/bindparser.yy
r1000 r1017 214 214 master: AWORD 215 215 { 216 s_di.master=$1; 216 if(!s_di.master.empty()) 217 s_di.master.append(1, ' '); 218 s_di.master.append($1); 217 219 free($1); 218 220 } trunk/pdns/pdns/communicator.cc
r1015 r1017 1 1 /* 2 2 PowerDNS Versatile Database Driven Nameserver 3 Copyright (C) 2002-200 5PowerDNS.COM BV3 Copyright (C) 2002-2007 PowerDNS.COM BV 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 21 21 #include "communicator.hh" 22 22 #include <set> 23 23 #include <boost/utility.hpp> 24 24 #include "dnsbackend.hh" 25 25 #include "ueberbackend.hh" … … 65 65 try { 66 66 Resolver resolver; 67 resolver.axfr(remote, domain.c_str());67 resolver.axfr(remote, domain.c_str()); 68 68 69 69 UeberBackend *B=dynamic_cast<UeberBackend *>(P.getBackend()); … … 251 251 resolver.makeUDPSocket(); 252 252 d_slaveschanged=true; 253 uint32_t ourserial=i->serial,theirserial=0; 254 255 try { 256 if(d_havepriosuckrequest) { 257 d_havepriosuckrequest=false; 253 uint32_t ourserial=i->serial, theirserial=0; 254 255 if(d_havepriosuckrequest) { 256 d_havepriosuckrequest=false; 257 break; 258 } 259 260 vector<string> masters; 261 stringtok(masters, i->master, ", \t"); 262 for(vector<string>::const_iterator iter = masters.begin(); iter != masters.end(); ++iter) { 263 try { 264 resolver.getSoaSerial(*iter, i->zone, &theirserial); 265 266 if(theirserial<i->serial) { 267 L<<Logger::Error<<"Domain "<<i->zone<<" more recent than master, our serial "<<ourserial<<" > their serial "<<theirserial<<endl; 268 i->backend->setFresh(i->id); 269 } 270 else if(theirserial==i->serial) { 271 L<<Logger::Warning<<"Domain "<<i->zone<<" is fresh"<<endl; 272 i->backend->setFresh(i->id); 273 } 274 else { 275 L<<Logger::Warning<<"Domain "<<i->zone<<" is stale, master serial "<<theirserial<<", our serial "<<i->serial<<endl; 276 addSuckRequest(i->zone, *iter); 277 } 258 278 break; 259 279 } 260 261 resolver.getSoaSerial(i->master, i->zone, &theirserial); 262 263 if(theirserial<i->serial) { 264 L<<Logger::Error<<"Domain "<<i->zone<<" more recent than master, our serial "<<ourserial<<" > their serial "<<theirserial<<endl; 265 i->backend->setFresh(i->id); 266 } 267 else if(theirserial==i->serial) { 268 L<<Logger::Warning<<"Domain "<<i->zone<<" is fresh"<<endl; 269 i->backend->setFresh(i->id); 270 } 271 else { 272 L<<Logger::Warning<<"Domain "<<i->zone<<" is stale, master serial "<<theirserial<<", our serial "<<i->serial<<endl; 273 addSuckRequest(i->zone,i->master); 274 } 275 } 276 catch(ResolverException &re) { 277 L<<Logger::Error<<"Error trying to retrieve/refresh '"+i->zone+"': "+re.reason<<endl; 280 catch(ResolverException &re) { 281 L<<Logger::Error<<"Error trying to retrieve/refresh '"+i->zone+"': "+re.reason<<endl; 282 if(next(iter) != masters.end()) 283 L<<Logger::Error<<"Trying next master for '"+i->zone+"'"<<endl; 284 } 285 catch(AhuException &re) { 286 L<<Logger::Error<<"Error trying to retrieve/refresh '"+i->zone+"': "+re.reason<<endl; 287 if(next(iter) != masters.end()) 288 L<<Logger::Error<<"Trying next master for '"+i->zone+"'"<<endl; 289 } 278 290 } 279 291 } 280 292 } 281 282 283 293 284 294 int CommunicatorClass::doNotifications() trunk/pdns/pdns/docs/pdns.sgml
r997 r1017 5809 5809 id INT auto_increment, 5810 5810 name VARCHAR(255) NOT NULL, 5811 master VARCHAR( 20) DEFAULT NULL,5811 master VARCHAR(128) DEFAULT NULL, 5812 5812 last_check INT DEFAULT NULL, 5813 5813 type VARCHAR(6) NOT NULL, … … 9597 9597 id INT auto_increment, 9598 9598 name VARCHAR(255) NOT NULL, 9599 master VARCHAR( 20) DEFAULT NULL,9599 master VARCHAR(128) DEFAULT NULL, 9600 9600 last_check INT DEFAULT NULL, 9601 9601 type VARCHAR(6) NOT NULL, … … 9659 9659 id SERIAL PRIMARY KEY, 9660 9660 name VARCHAR(255) NOT NULL, 9661 master VARCHAR( 20) DEFAULT NULL,9661 master VARCHAR(128) DEFAULT NULL, 9662 9662 last_check INT DEFAULT NULL, 9663 9663 type VARCHAR(6) NOT NULL, … … 9719 9719 id NUMBER, 9720 9720 name VARCHAR(255) NOT NULL, 9721 master VARCHAR( 20) DEFAULT NULL,9721 master VARCHAR(128) DEFAULT NULL, 9722 9722 last_check INT DEFAULT NULL, 9723 9723 type VARCHAR(6) NOT NULL, … … 10333 10333 ID number(11) NOT NULL, 10334 10334 NAME VARCHAR(255) NOT NULL, 10335 MASTER VARCHAR( 20) DEFAULT NULL,10335 MASTER VARCHAR(128) DEFAULT NULL, 10336 10336 LAST_CHECK INT DEFAULT NULL, 10337 10337 TYPE VARCHAR(6) NOT NULL, … … 10436 10436 id INTEGER PRIMARY KEY, 10437 10437 name VARCHAR(255) NOT NULL, 10438 master VARCHAR( 20) DEFAULT NULL,10438 master VARCHAR(128) DEFAULT NULL, 10439 10439 last_check INTEGER DEFAULT NULL, 10440 10440 type VARCHAR(6) NOT NULL,