From: bert hubert Date: Fri, 25 Mar 2016 20:33:24 +0000 (+0100) Subject: fix up dnspcap2protobuf htons plus catch exception X-Git-Tag: dnsdist-1.0.0-beta1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b448d84067826c9b0a10998f862415d5067a116;p=thirdparty%2Fpdns.git fix up dnspcap2protobuf htons plus catch exception --- diff --git a/pdns/dnspcap2protobuf.cc b/pdns/dnspcap2protobuf.cc index a4dfeff463..d5ace94f22 100644 --- a/pdns/dnspcap2protobuf.cc +++ b/pdns/dnspcap2protobuf.cc @@ -13,6 +13,7 @@ StatBag S; static void addRRs(const char* packet, const size_t len, PBDNSMessage_DNSResponse& response) +try { if (len < sizeof(struct dnsheader)) return; @@ -71,7 +72,10 @@ static void addRRs(const char* packet, const size_t len, PBDNSMessage_DNSRespons } } } - +catch(std::exception& e) +{ + cerr<<"Error parsing response records: "<qr) {