Permalink
Browse files

we would attempt to protobuf log DNS questions without a set question…

… and get exceptions over that

(cherry picked from commit da5bcd9)
  • Loading branch information...
ahupowerdns authored and pieterlexis committed May 11, 2017
1 parent 8b45481 commit 83f92264552d13eb8a6620e20b22d1875c6a1caa
Showing with 2 additions and 1 deletion.
  1. +2 −1 pdns/protobuf.cc
View
@@ -37,7 +37,8 @@ void DNSProtoBufMessage::setQuestion(const DNSName& qname, uint16_t qtype, uint1
#ifdef HAVE_PROTOBUF
PBDNSMessage_DNSQuestion* question = d_message.mutable_question();
if (question) {
- question->set_qname(qname.toString());
+ if(!qname.empty())
+ question->set_qname(qname.toString());
question->set_qtype(qtype);
question->set_qclass(qclass);
}

0 comments on commit 83f9226

Please sign in to comment.