[Pdns-dev] dnsproxy code buffer size
Bauer, Steven J.
Steve.Bauer at sdsmt.edu
Wed Apr 27 17:34:20 CEST 2011
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.)?
char buffer; <--Buffer to small for large datasets
len=recv(d_sock, buffer, sizeof(buffer),0); // answer from our backend
L<<Logger::Error<<"Error receiving packet from recursor backend: "<<stringerror()<<endl;
L<<Logger::Error<<"Error receiving packet from recursor backend, EOF"<<endl;
L<<Logger::Error<<"Short packet from recursor backend, "<<len<<" bytes"<<endl;
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)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pdns-dev