From: Yuri Schaeffer Date: Thu, 24 Jan 2013 16:03:38 +0000 (+0000) Subject: rollback invalid assumption X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=658634858e86ceeceb38ea81ffa92cd29cdcdb6e;p=thirdparty%2Funbound.git rollback invalid assumption Also, let checkconf pass. git-svn-id: file:///svn/unbound/branches/edns-subnet@2822 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/services/mesh.c b/services/mesh.c index f785e7a9b..27d6a9521 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -376,13 +376,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, edns->subnet_source_mask = MAX_CLIENT_SUBNET_IP4; edns->subnet_addr_fam = IANA_ADDRFAM_IP4; sinaddr = &((struct sockaddr_in*)ss)->sin_addr; -#ifndef unbound_testbound memcpy(edns->subnet_addr, (uint8_t *)sinaddr, INET_SIZE); -#else - /* sinaddr does not contain any valid data when running - * testbound. Provide a constant so we can do our tests */ - memcpy(edns->subnet_addr, (uint8_t *)[5,0,15,10], INET_SIZE); -#endif /* unbound_testbound */ edns->subnet_validdata = 1; } #ifdef INET6 @@ -390,14 +384,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, edns->subnet_source_mask = MAX_CLIENT_SUBNET_IP6; edns->subnet_addr_fam = IANA_ADDRFAM_IP6; sinaddr = &((struct sockaddr_in6*)ss)->sin6_addr; -#ifndef unbound_testbound memcpy(edns->subnet_addr, (uint8_t *)sinaddr, INET6_SIZE); -#else - /* sinaddr does not contain any valid data when running - * testbound. Provide a constant so we can do our tests */ - memcpy(edns->subnet_addr, (uint8_t *)[5,0,15,10, 5,0,15,10, - 5,0,15,10, 5,0,15,10], INET6_SIZE); -#endif /* unbound_testbound */ edns->subnet_validdata = 1; } #else diff --git a/smallapp/unbound-checkconf.c b/smallapp/unbound-checkconf.c index c73d8bdc7..e9716f7a2 100644 --- a/smallapp/unbound-checkconf.c +++ b/smallapp/unbound-checkconf.c @@ -395,6 +395,10 @@ morechecks(struct config_file* cfg, const char* fname) && strcmp(cfg->module_conf, "python iterator") != 0 && strcmp(cfg->module_conf, "python validator iterator") != 0 && strcmp(cfg->module_conf, "validator python iterator") != 0 +#endif +#ifdef CLIENT_SUBNET + && strcmp(cfg->module_conf, "subnetcache iterator") != 0 + && strcmp(cfg->module_conf, "subnetcache validator iterator") != 0 #endif ) { fatal_exit("module conf '%s' is not known to work",