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

WARNING WARNING: We now listen on 127.0.0.1 by default *AND* only reply to RFC 1918 addresses by default
Ignore answers w/o a question
s/spoof/unexpected/

Files:
1 modified

Legend:

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

    r696 r697  
    726726    ::arg().set("aaaa-additional-processing","turn on to do AAAA additional processing (slow)")="off"; 
    727727    ::arg().set("local-port","port to listen on")="53"; 
    728     ::arg().set("local-address","IP addresses to listen on, separated by spaces or commas")="0.0.0.0"; 
     728    ::arg().set("local-address","IP addresses to listen on, separated by spaces or commas")="127.0.0.1"; 
    729729    ::arg().set("trace","if we should output heaps of logging")="off"; 
    730730    ::arg().set("daemon","Operate as a daemon")="yes"; 
     
    742742    ::arg().set("hint-file", "If set, load root hints from this file")=""; 
    743743    ::arg().set("max-cache-entries", "If set, maximum number of entries in the main cache")="0"; 
    744     ::arg().set("allow-from", "If set, only allow these comma separated netmasks to recurse")=""; 
     744    ::arg().set("allow-from", "If set, only allow these comma separated netmasks to recurse")="127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12"; 
    745745    ::arg().set("max-tcp-per-client", "If set, maximum number of TCP sessions per client (IP address)")="0"; 
    746746    ::arg().set("fork", "If set, fork the daemon for possible double performance")="no"; 
     
    943943            memcpy(&dh, data, sizeof(dh)); 
    944944             
    945             if(dh.qr) { 
     945            if(dh.qr && dh.qdcount) { 
    946946              pident.remote=fromaddr; 
    947947              pident.id=dh.id; 
     
    950950              if(!MT->sendEvent(pident, &packet)) { 
    951951                if(logCommonErrors) 
    952                   L<<Logger::Warning<<"Discarding unexpected packet from "<<sockAddrToString((struct sockaddr_in*) &fromaddr, addrlen)<<"\n"; 
    953                 g_stats.spoofedCount++; 
     952                  L<<Logger::Warning<<"Discarding unexpected packet from "<<sockAddrToString((struct sockaddr_in*) &fromaddr, addrlen)<<endl; 
     953                g_stats.unexpectedCount++; 
    954954              } 
    955955            }