Changeset 696

Show
Ignore:
Timestamp:
04/14/06 10:28:27 (4 years ago)
Author:
ahu
Message:

actually check output of sendEvent and log

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/pdns_recursor.cc

    r688 r696  
    312312    pw.getHeader()->rd=dc->d_mdp.d_header.rd; 
    313313 
    314     //    MT->setTitle("udp question for "+P.qdomain+"|"+P.qtype.getName()); 
    315314    SyncRes sr(dc->d_now); 
    316315    if(!g_quiet) 
     
    402401    } 
    403402 
    404     //    MT->setTitle("DONE! udp question for "+P.qdomain+"|"+P.qtype.getName()); 
    405403    if(!g_quiet) { 
    406404      L<<Logger::Error<<"["<<MT->getTid()<<"] answer to "<<(dc->d_mdp.d_header.rd?"":"non-rd ")<<"question '"<<dc->d_mdp.d_qname<<"|"<<DNSRecordContent::NumberToType(dc->d_mdp.d_qtype); 
     
    950948              string packet; 
    951949              packet.assign(data, d_len); 
    952               MT->sendEvent(pident, &packet); 
     950              if(!MT->sendEvent(pident, &packet)) { 
     951                if(logCommonErrors) 
     952                  L<<Logger::Warning<<"Discarding unexpected packet from "<<sockAddrToString((struct sockaddr_in*) &fromaddr, addrlen)<<"\n"; 
     953                g_stats.spoofedCount++; 
     954              } 
    953955            } 
    954956            else