Please sign in to comment.
Read longer buffer over TCP connections
Changed 'dnscache' server to read longer buffers over TCP connections. Earlier it used to read 1 byte at a time. That is slower, plus for long messages(ex: 65535 bytes), that means those many read(2) calls. Thus unnecessarily burning CPU cycles. It could also lead to potential denial of service. $ drill -t PTR 184.108.40.206.in-addr.arpa ... ;; MSG SIZE rcvd: 53570 Reading longer buffers accelerates the reading, making slight gain in performance. Thanks to Mr Frank Denis for creating this patch and for making it available for all. -> http://download.pureftpd.org/misc/dnscache-dos.c
- Loading branch information...