mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-03 13:29:36 -05:00
- rpz-triggers, check for alloc failure and zone for add rpz soa.
This commit is contained in:
parent
568aab1b67
commit
44f5d27683
1 changed files with 3 additions and 0 deletions
|
|
@ -1637,6 +1637,7 @@ rpz_add_soa(struct reply_info* rep, struct module_qstate* ms,
|
|||
struct auth_rrset* soa = NULL;
|
||||
struct ub_packed_rrset_key* rsoa = NULL;
|
||||
struct ub_packed_rrset_key** prevrrsets;
|
||||
if(!az) return 1;
|
||||
soa = auth_zone_get_soa_rrset(az);
|
||||
if(!soa) return 1;
|
||||
if(!rep) return 0;
|
||||
|
|
@ -1645,6 +1646,8 @@ rpz_add_soa(struct reply_info* rep, struct module_qstate* ms,
|
|||
prevrrsets = rep->rrsets;
|
||||
rep->rrsets = regional_alloc_zero(ms->region,
|
||||
sizeof(*rep->rrsets)*(rep->rrset_count+1));
|
||||
if(!rep->rrsets)
|
||||
return 0;
|
||||
if(prevrrsets && rep->rrset_count > 0)
|
||||
memcpy(rep->rrsets, prevrrsets, rep->rrset_count*sizeof(*rep->rrsets));
|
||||
rep->rrset_count++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue