]> granicus.if.org Git - pdns/commit
dnsdist: Prevent EOF error for empty console response w/o sodium
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 18 Mar 2016 09:55:38 +0000 (10:55 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 18 Mar 2016 09:55:38 +0000 (10:55 +0100)
commite4ef64beea862790bf81f8554cc23aded72e758e
tree8f102a609be4be8bc8cb3af3366d940ec6b9676e
parent7c3106d3ba663ae80e4e1d00c4ee7ff7a62641db
dnsdist: Prevent EOF error for empty console response w/o sodium

Prevent the "Fatal error: EOF while reading message" error when
the server send an empty response to a single console command.
It was caused by calling `readn2()` for a 0-sized read.
When libsodium support is enabled, padding prevents 0-sized
responses anyway.
pdns/dnsdist-console.cc