]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- subnet mem value is available in shm, also when not enabled,
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 12 Apr 2017 15:01:11 +0000 (15:01 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 12 Apr 2017 15:01:11 +0000 (15:01 +0000)
  to make the struct easier to memmap by other applications,
  independent of the configuration of unbound.

git-svn-id: file:///svn/unbound/trunk@4112 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/shm_side/shm_main.c
util/shm_side/shm_main.h

index cac2abbd13116bb1c5ee93c5dab1bec5c3e8e24f..ccc5c0158b928d81a779e1b3257454ff8b77e48f 100644 (file)
@@ -1,3 +1,8 @@
+12 April 2017: Wouter
+       - subnet mem value is available in shm, also when not enabled,
+         to make the struct easier to memmap by other applications,
+         independent of the configuration of unbound.
+
 12 April 2017: Ralph
        - Fix #1247: unbound does not shorten source prefix length when
          forwarding ECS.
index bfe14f3d637ce8df9bd6fb59c0f298cbc8ba8035..cab9aed560bd864b1c99d6e81c673a282f60ee4a 100644 (file)
@@ -262,8 +262,11 @@ void shm_main_run(struct worker *worker)
                        fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->mods.mod[modstack]->get_mem));
                        shm_stat->mem.iter = (*worker->env.mesh->mods.mod[modstack]->get_mem)(&worker->env, modstack);
                }
-#ifdef CLIENT_SUBNET
+               /* subnet mem value is available in shm, also when not enabled,
+                * to make the struct easier to memmap by other applications,
+                * independent of the configuration of unbound */
                shm_stat->mem.subnet = 0;
+#ifdef CLIENT_SUBNET
                modstack = modstack_find(&worker->env.mesh->mods, "subnet");
                if(modstack != -1) {
                        fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->mods.mod[modstack]->get_mem));
index 1ecac5560056ff6c527e83bf430fb8c5651bb52f..8e4f4d05102641aa226c89bc0ba12bea9d82b547 100644 (file)
@@ -61,9 +61,7 @@ struct shm_stat_info {
                size_t rrset;
                size_t val;
                size_t iter;
-#ifdef CLIENT_SUBNET
                size_t subnet;
-#endif
        } mem;
 };