mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-24 00:29:58 -05:00
- Fix #1190: Do not echo back EDNS options in local-zone error response.
- iana portlist update git-svn-id: file:///svn/unbound/trunk@3972 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
95d5334783
commit
b4b2c18909
3 changed files with 29 additions and 9 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
23 December 2016: Ralph
|
||||||
|
- Fix #1190: Do not echo back EDNS options in local-zone error response.
|
||||||
|
- iana portlist update
|
||||||
|
|
||||||
21 December 2016: Ralph
|
21 December 2016: Ralph
|
||||||
- Fix #1188: Unresolved symbol 'fake_dsa' in libunbound.so when built
|
- Fix #1188: Unresolved symbol 'fake_dsa' in libunbound.so when built
|
||||||
with Nettle
|
with Nettle
|
||||||
|
|
|
||||||
|
|
@ -1214,6 +1214,24 @@ local_encode(struct query_info* qinfo, struct module_env* env,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** encode local error answer */
|
||||||
|
static void
|
||||||
|
local_error_encode(struct query_info* qinfo, struct module_env* env,
|
||||||
|
struct edns_data* edns, sldns_buffer* buf, struct regional* temp,
|
||||||
|
int rcode, uint16_t flags)
|
||||||
|
{
|
||||||
|
edns->edns_version = EDNS_ADVERTISED_VERSION;
|
||||||
|
edns->udp_size = EDNS_ADVERTISED_SIZE;
|
||||||
|
edns->ext_rcode = 0;
|
||||||
|
edns->bits &= EDNS_DO;
|
||||||
|
|
||||||
|
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
|
||||||
|
rcode, edns, temp))
|
||||||
|
edns->opt_list = NULL;
|
||||||
|
error_encode(buf, flags, qinfo, *(uint16_t*)sldns_buffer_begin(buf),
|
||||||
|
sldns_buffer_read_u16_at(buf, 2), edns);
|
||||||
|
}
|
||||||
|
|
||||||
/** find local data tag string match for the given type in the list */
|
/** find local data tag string match for the given type in the list */
|
||||||
static int
|
static int
|
||||||
find_tag_datas(struct query_info* qinfo, struct config_strlist* list,
|
find_tag_datas(struct query_info* qinfo, struct config_strlist* list,
|
||||||
|
|
@ -1414,9 +1432,8 @@ lz_zone_answer(struct local_zone* z, struct module_env* env,
|
||||||
return 1;
|
return 1;
|
||||||
} else if(lz_type == local_zone_refuse
|
} else if(lz_type == local_zone_refuse
|
||||||
|| lz_type == local_zone_always_refuse) {
|
|| lz_type == local_zone_always_refuse) {
|
||||||
error_encode(buf, (LDNS_RCODE_REFUSED|BIT_AA), qinfo,
|
local_error_encode(qinfo, env, edns, buf, temp,
|
||||||
*(uint16_t*)sldns_buffer_begin(buf),
|
LDNS_RCODE_REFUSED, (LDNS_RCODE_REFUSED|BIT_AA));
|
||||||
sldns_buffer_read_u16_at(buf, 2), edns);
|
|
||||||
return 1;
|
return 1;
|
||||||
} else if(lz_type == local_zone_static ||
|
} else if(lz_type == local_zone_static ||
|
||||||
lz_type == local_zone_redirect ||
|
lz_type == local_zone_redirect ||
|
||||||
|
|
@ -1433,9 +1450,8 @@ lz_zone_answer(struct local_zone* z, struct module_env* env,
|
||||||
if(z->soa)
|
if(z->soa)
|
||||||
return local_encode(qinfo, env, edns, buf, temp,
|
return local_encode(qinfo, env, edns, buf, temp,
|
||||||
z->soa, 0, rcode);
|
z->soa, 0, rcode);
|
||||||
error_encode(buf, (rcode|BIT_AA), qinfo,
|
local_error_encode(qinfo, env, edns, buf, temp, rcode,
|
||||||
*(uint16_t*)sldns_buffer_begin(buf),
|
(rcode|BIT_AA));
|
||||||
sldns_buffer_read_u16_at(buf, 2), edns);
|
|
||||||
return 1;
|
return 1;
|
||||||
} else if(lz_type == local_zone_typetransparent
|
} else if(lz_type == local_zone_typetransparent
|
||||||
|| lz_type == local_zone_always_transparent) {
|
|| lz_type == local_zone_always_transparent) {
|
||||||
|
|
@ -1451,9 +1467,8 @@ lz_zone_answer(struct local_zone* z, struct module_env* env,
|
||||||
if(z->soa)
|
if(z->soa)
|
||||||
return local_encode(qinfo, env, edns, buf, temp,
|
return local_encode(qinfo, env, edns, buf, temp,
|
||||||
z->soa, 0, rcode);
|
z->soa, 0, rcode);
|
||||||
error_encode(buf, (rcode|BIT_AA), qinfo,
|
local_error_encode(qinfo, env, edns, buf, temp, rcode,
|
||||||
*(uint16_t*)sldns_buffer_begin(buf),
|
(rcode|BIT_AA));
|
||||||
sldns_buffer_read_u16_at(buf, 2), edns);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4849,6 +4849,7 @@
|
||||||
8793,
|
8793,
|
||||||
8800,
|
8800,
|
||||||
8804,
|
8804,
|
||||||
|
8808,
|
||||||
8873,
|
8873,
|
||||||
8880,
|
8880,
|
||||||
8883,
|
8883,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue