From: bert hubert Date: Thu, 11 May 2017 15:16:20 +0000 (+0200) Subject: we would attempt to protobuf log DNS questions without a set question and get excepti... X-Git-Tag: rec-4.1.0-alpha1~130^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5312%2Fhead;p=thirdparty%2Fpdns.git we would attempt to protobuf log DNS questions without a set question and get exceptions over that --- diff --git a/pdns/protobuf.cc b/pdns/protobuf.cc index c881e0084b..c7241ad0f2 100644 --- a/pdns/protobuf.cc +++ b/pdns/protobuf.cc @@ -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); }