After looking into the code that is used for proxying the dns requests to the 
recursor server, I was wondering what happens when the responses are larger 
than 1500 bytes?  Wouldn't this potentially cause issues when large data sets 
are passed back (DNSSEC data, etc.)?


void DNSProxy::mainloop(void)
{
  try {
    char buffer[1500];                       <--Buffer to small for large 
datasets
    int len;

    for(;;) {
      len=recv(d_sock, buffer, sizeof(buffer),0); // answer from our backend
      if(len<12) {
        if(len<0)
          L<<Logger::Error<<"Error receiving packet from recursor backend: 
"<<stringerror()<<endl;
        else if(len==0)
          L<<Logger::Error<<"Error receiving packet from recursor backend, 
EOF"<<endl;
        else
          L<<Logger::Error<<"Short packet from recursor backend, "<<len<<" 
bytes"<<endl;

        continue;
      }
      (*d_resanswers)++;
      (*d_udpanswers)++;


Also, digging into the class DNSPacket which  is used later on to store the 
data that has been sent back, there appears to be a limit of 1680 bytes.  (line 
442 in DNSpacket.cc)

Steve

_______________________________________________
Pdns-dev mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-dev

Reply via email to