From: Pieter Lexis Date: Thu, 19 Apr 2018 08:49:56 +0000 (+0200) Subject: getEDNSOpts: use getRR X-Git-Tag: dnsdist-1.3.1~50^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc9d2fe3c5e6102ee349d43011a9ef0d378c13f3;p=pdns getEDNSOpts: use getRR --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 3788bbb62..14a10bb7d 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -557,9 +557,8 @@ bool getEDNSOpts(const MOADNSParser& mdp, EDNSOpts* eo) eo->d_extRCode=stuff.extRCode; eo->d_version=stuff.version; eo->d_extFlags = ntohs(stuff.extFlags); - OPTRecordContent* orc = - dynamic_cast(val.first.d_content.get()); - if(!orc) + auto orc = getRR(val.first); + if(orc == nullptr) return false; orc->getData(eo->d_options); return true;