mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-10 20:07:43 +02:00
- Be lenient and accept imgw.pl malformed packet (like BIND).
git-svn-id: file:///svn/unbound/trunk@2339 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -903,8 +903,11 @@ parse_packet(ldns_buffer* pkt, struct msg_parse* msg, struct regional* region)
|
||||
if((ret = parse_section(pkt, msg, region, LDNS_SECTION_AUTHORITY,
|
||||
msg->nscount, &msg->ns_rrsets)) != 0)
|
||||
return ret;
|
||||
if((ret = parse_section(pkt, msg, region, LDNS_SECTION_ADDITIONAL,
|
||||
msg->arcount, &msg->ar_rrsets)) != 0)
|
||||
if(ldns_buffer_remaining(pkt) == 0 && msg->arcount == 1) {
|
||||
/* BIND accepts leniently that an EDNS record is missing.
|
||||
* so, we do too. */
|
||||
} else if((ret = parse_section(pkt, msg, region,
|
||||
LDNS_SECTION_ADDITIONAL, msg->arcount, &msg->ar_rrsets)) != 0)
|
||||
return ret;
|
||||
/* if(ldns_buffer_remaining(pkt) > 0) { */
|
||||
/* there is spurious data at end of packet. ignore */
|
||||
|
||||
Reference in New Issue
Block a user