Assertion incorrect. Compressed packets can be larger.

git-svn-id: file:///svn/unbound/trunk@718 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-10-30 13:40:43 +00:00
parent 298e1fd688
commit 0eb3149af5
4 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,8 @@
30 October 2007: Wouter
- fixup assertion failure that relied on compressed names to be
smaller than uncompressed names. A packet from comrite.com was seen
to be compressed to a larger size. Added it as unit test.
23 October 2007: Wouter
- fixup (grand-)parent problem for dnssec-lameness detection.
- fixup tests to do additional section processing for lame replies,

View File

@ -50,3 +50,5 @@ o grab ports nonconsequtive and change the set after a while (change within
a given range). Could be bad for OS if wrong port. unsure if it helps secure.
o make timeout backoffs randomized (a couple percent random) to spread traffic.
o inspect date on executable, then warn user in log if its more than 1 year.
o proactively prime root, stubs and trust anchors, feature.
early failure, faster on first query, but more traffic.

View File

@ -11,3 +11,12 @@ AA3CB31FD2E8D756F425A80CDA9EDB48A9547582F998D363D8D64E45E65EFECA8BD11B3036D2B8B1
70800010200107B802060001020039FFFE59B187C9D0000100010000FE8B00043E0456E6CB68002E00010000025800A0002105040000025846E6941D46C1AA1D4706096E6C6E65746C616273026E6C0098CEBAD0E8783AE7234B216005CD368086EAE5879C25181A0FF4533F5FE60D5E818D6B10AA5D96D57B9648CD1A530184D128AD1F04BF03316563383A85BF22F8E0E8E2551F419BEFBE849B2C6510A4471D7A285DD071511AF1AEB555A2DDBEDFE535717C1384FA130CEAC5EE86B07A61FAB69C3CEA143FC6AE5006D2152E9CFDCB89002E00010000025800A0000105030000025846E6941C46C1AA1C4706096E6C6E65746C616273026E6C00432C065713ABF3D8C9C40E1A46EF6FE49F2060689C281BACDDC98ECD06F3D354D77B2216E4EE408D080F9DF86F0F1C427B772D32EDCEE989B2AC8D76615E59E6FD11A1A963D5CEEB40F05C04CC4752A7308739B3C6C9C06A92D65522AB674AD2C27DC5DAC91044DE85A5D8126E170E515C52A642F51FB24323DEE893AF9995DCC02A002E00010000025800A0000105030000025846E6941C46C1AA1C4706096E6C6E65746C616273026E6C000EBC0704DD6A076244351A27EE61E35EA294A2E6726C919E8BF33BDF7DC97913FE54C1EAAE26624C3F852C77BA1356AF771C3AC6636A3C23DE82AB03FE9F72515E6289D18779083006FE38152773E0AD6A3E9831006B9EA6
490EEAFE1359AC9FF23F1189E303B838C5D4F3BBDE4FDFC531F1B1095E8BB301F5F8F17C2F20B526C02A002E00010000025800A0001C05030000025846E6941C46C1AA1C4706096E6C6E65746C616273026E6C006D9C956476F8A04DE789F4439DFFB289AED649EC80320B0A68AE004FD5B39D5F3A955B18AB2DB535662B624FC36ECCBAEC421C7C3D3C2E67ADE6B284AE424974BF24CFAC9A6C3AF9541E70C4D4B8F196419D34C7686D5D95693C4C75B560E543BAED77EF343C1D14F0C5CC842757ABC86B6EC9A8C41F38AEF12B9E7886B1251ECB680021000100000258001B0000000013C4066A6F686E6E79096E6C6E65746C616273026E6C000000291000000080000000
;-- next packet --
; this packet contains a SOA record, the
; comrite.com. 86400 IN SOA ns15.domaincontrol.com. dns.jomax.net. 2006092800 28800 7200 604800 86400
; with dns.jomax.net. having its root label compressed 0xc040.
00588400000100000001000007
636F6D7269746503636F6D00001C0001C00C0006000100015180003C046E7331350D646F6D61696E
636F6E74726F6C03636F6D0003646E73056A6F6D6178036E6574C04077928C000000708000001C20
00093A8000015180

View File

@ -175,7 +175,6 @@ rdata_copy(ldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to,
pkt_len = ldns_buffer_read_u16(pkt);
if(ldns_buffer_remaining(pkt) < pkt_len)
return 0;
log_assert((size_t)pkt_len+2 <= rr->size);
desc = ldns_rr_descript(type);
if(pkt_len > 0 && desc && desc->_dname_count > 0) {
int count = (int)desc->_dname_count;