- Fix #1249: unbound doesn't return FORMERR to bogus ECS.

git-svn-id: file:///svn/unbound/trunk@4110 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Ralph Dolmans 2017-04-12 13:12:21 +00:00
parent 2be864c218
commit 1c02193ddb
2 changed files with 8 additions and 2 deletions

View file

@ -2,6 +2,7 @@
- Fix #1247: unbound does not shorten source prefix length when
forwarding ECS.
- Properly check for allocation failure in local_data_find_tag_datas.
- Fix #1249: unbound doesn't return FORMERR to bogus ECS.
11 April 2017: Ralph
- Display ECS module memory usage.

View file

@ -661,9 +661,14 @@ subnetmod_operate(struct module_qstate *qstate, enum module_ev event,
if((ecs_opt = edns_opt_list_find(
qstate->edns_opts_front_in,
qstate->env->cfg->client_subnet_opcode))) {
if(parse_subnet_option(ecs_opt, &sq->ecs_client_in)) {
sq->subnet_downstream = 1;
if(!parse_subnet_option(ecs_opt, &sq->ecs_client_in)) {
/* Wrongly formatted ECS option. RFC mandates to
* return FORMERROR. */
qstate->return_rcode = LDNS_RCODE_FORMERR;
qstate->ext_state[id] = module_finished;
return;
}
sq->subnet_downstream = 1;
}
else if(qstate->mesh_info->reply_list) {
subnet_option_from_ss(