From a2d002aadb85c6411b55e3966247efb21eeff2b8 Mon Sep 17 00:00:00 2001 From: beware Date: Mon, 4 Apr 2011 14:58:41 +0000 Subject: [PATCH] increased maximum RR of a kind limit check git-svn-id: file:///svnroot/lcore/trunk@99 b1de8a11-f9be-4011-bde0-cc7ace90066a --- dnscore.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dnscore.pas b/dnscore.pas index fa9eee2..3a9596f 100644 --- a/dnscore.pas +++ b/dnscore.pas @@ -106,7 +106,10 @@ const querytype_txt=16; querytype_spf=99; maxrecursion=50; - maxrrofakind=20; + maxrrofakind=32; + {the maximum number of RR of a kind of purely an extra sanity check and could be omitted. + before, i set it to 20, but valid replies can have more. dnscore only does udp requests, + and ordinary DNS, so up to 512 bytes. the maximum number of A records that fits seems to be 29} retryafter=300000; //microseconds must be less than one second; timeoutlag=1000000000; // penalty value to be treated as lag in the event of a timeout (microseconds) @@ -502,7 +505,10 @@ begin state.numrr2 := 0; for a := 0 to 3 do begin state.numrr1[a] := htons(state.recvpacket.rrcount[a]); - if state.numrr1[a] > maxrrofakind then goto failure; + if state.numrr1[a] > maxrrofakind then begin + failurereason := 'exceeded maximum RR of a kind'; + goto failure; + end; inc(state.numrr2,state.numrr1[a]); end; -- 2.30.2