]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
rollback invalid assumption
authorYuri Schaeffer <yuri@nlnetlabs.nl>
Thu, 24 Jan 2013 16:03:38 +0000 (16:03 +0000)
committerYuri Schaeffer <yuri@nlnetlabs.nl>
Thu, 24 Jan 2013 16:03:38 +0000 (16:03 +0000)
Also, let checkconf pass.

git-svn-id: file:///svn/unbound/branches/edns-subnet@2822 be551aaa-1e26-0410-a405-d3ace91eadb9

services/mesh.c
smallapp/unbound-checkconf.c

index f785e7a9b0a329b6d3b1f1b9d5d5b44b5476a619..27d6a95213ad0f32352f57f93462a28efa9085f3 100644 (file)
@@ -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
index c73d8bdc7c9c10957bdb0a2a031234c555428eda..e9716f7a28161cbb6bfa154174d7b8a920d885d7 100644 (file)
@@ -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",