Skip to content

Commit

Permalink
Backport PowerDNS#5678
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlexis committed Nov 13, 2017
2 parents 5376c06 + 722dc74 commit 6336868
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pdns/dnspacket.cc
Expand Up @@ -559,7 +559,10 @@ try

if(getEDNSOpts(mdp, &edo)) {
d_haveednssection=true;
d_maxreplylen=std::min(edo.d_packetsize, s_udpTruncationThreshold);
/* rfc6891 6.2.3:
"Values lower than 512 MUST be treated as equal to 512."
*/
d_maxreplylen=std::min(std::max(static_cast<uint16_t>(512), edo.d_packetsize), s_udpTruncationThreshold);
// cerr<<edo.d_Z<<endl;
if(edo.d_Z & EDNSOpts::DNSSECOK)
d_dnssecOk=true;
Expand Down

0 comments on commit 6336868

Please sign in to comment.