- Fix parse error on negative SOA RRSIGs if badly ordered in the packet.

git-svn-id: file:///svn/unbound/trunk@2573 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2011-12-15 13:37:13 +00:00
parent 5ae8bec719
commit 65ad15da56
4 changed files with 45 additions and 1 deletions
+10 -1
View File
@@ -59,6 +59,8 @@ static int check_formerr_gone = 0;
static int matches_nolocation = 0;
/** see if RRSIGs are properly matched to RRsets. */
static int check_rrsigs = 0;
/** do not check buffer sameness */
static int check_nosameness = 0;
/** match two rr lists */
static int
@@ -431,7 +433,8 @@ testpkt(ldns_buffer* pkt, struct alloc_cache* alloc, ldns_buffer* out,
if(vbmp) printf("inlen %u outlen %u\n",
(unsigned)ldns_buffer_limit(pkt),
(unsigned)ldns_buffer_limit(out));
test_buffers(pkt, out);
if(!check_nosameness)
test_buffers(pkt, out);
if(check_rrsigs)
check_the_rrsigs(&qi, rep);
@@ -607,6 +610,12 @@ void msgparse_test(void)
testfromdrillfile(pkt, &alloc, out, "testdata/test_packets.8");
check_formerr_gone = 0;
check_rrsigs = 1;
check_nosameness = 1;
testfromdrillfile(pkt, &alloc, out, "testdata/test_packets.9");
check_nosameness = 0;
check_rrsigs = 0;
/* cleanup */
alloc_clear(&alloc);
alloc_clear(&super_a);