Changeset 434
- Timestamp:
- 07/06/05 09:10:24 (8 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 2 modified
-
lwres.cc (modified) (4 diffs)
-
syncres.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/lwres.cc
r433 r434 1 1 /* 2 2 PowerDNS Versatile Database Driven Nameserver 3 Copyright (C) 2002 PowerDNS.COM BV3 Copyright (C) 2002 - 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 as 7 published by the Free Software Foundation 9 8 10 9 This program is distributed in the hope that it will be useful, … … 104 103 105 104 if(asendtcp(packet, &s) == 0) { 106 cerr<<"asendtcp: timeout"<<endl;107 return -1;105 // cerr<<"asendtcp: timeout"<<endl; 106 return 0; 108 107 } 109 108 110 109 packet.clear(); 111 110 if(arecvtcp(packet,2, &s)==0) { 112 cerr<<"arecvtcp: timeout"<<endl;113 return -1;111 // cerr<<"arecvtcp: timeout"<<endl; 112 return 0; 114 113 } 115 114 … … 120 119 121 120 if(arecvtcp(packet, len, &s)==0) { 122 cerr<<"arecvtcp: timeout"<<endl;123 return -1;121 // cerr<<"arecvtcp: timeout"<<endl; 122 return 0; 124 123 } 125 124 … … 142 141 throw LWResException("resolver: unable to parse packet of "+itoa(d_len)+" bytes"); 143 142 d_aabit=p.d.aa; 144 d_ aabit=p.d.tc;143 d_tcbit=p.d.tc; 145 144 d_rcode=p.d.rcode; 146 145 return p.getAnswers(); -
trunk/pdns/pdns/syncres.cc
r433 r434 412 412 413 413 result=d_lwr.result(); 414 415 if(d_lwr.d_tcbit) { 416 if(!doTCP) { 417 doTCP=true; 418 LOG<<prefix<<qname<<": truncated bit set, retrying via TCP"<<endl; 419 goto TryTCP; 420 } 421 LOG<<prefix<<qname<<": truncated bit set, over TCP?"<<endl; 422 return RCode::ServFail; 423 } 424 414 425 if(d_lwr.d_rcode==RCode::ServFail) { 415 426 LOG<<prefix<<qname<<": "<<*tns<<" returned a ServFail, trying sibling NS"<<endl; … … 537 548 } 538 549 if(nsset.empty() && !d_lwr.d_rcode) { 539 if(!negindic && d_lwr.d_tcbit) { 540 if(!doTCP) { 541 doTCP=true; 542 LOG<<prefix<<qname<<": status=noerror, truncated bit set, no negative SOA, retrying via TCP"<<endl; 543 goto TryTCP; 544 } 545 LOG<<prefix<<qname<<": status=noerror, truncated bit set, over TCP?"<<endl; 546 continue; 547 } 550 548 551 LOG<<prefix<<qname<<": status=noerror, other types may exist, but we are done "<<(negindic ? "(have negative SOA)" : "")<<endl; 549 552 return 0;