]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix subnetcache statistics 538/head
authorThomas du Boÿs <thomas.du-boys@ovhcloud.com>
Fri, 3 Sep 2021 07:59:15 +0000 (09:59 +0200)
committerThomas du Boÿs <thomas.du-boys@ovhcloud.com>
Fri, 3 Sep 2021 08:37:07 +0000 (10:37 +0200)
daemon/remote.c
daemon/stats.c
daemon/worker.c
util/shm_side/shm_main.c

index 923ddefa4f2961938f3ab394ceca43d0f332fa91..adf0383895d49a3ce54bbafb87beb0147da14629 100644 (file)
@@ -813,7 +813,7 @@ print_mem(RES* ssl, struct worker* worker, struct daemon* daemon,
        iter = mod_get_mem(&worker->env, "iterator");
        respip = mod_get_mem(&worker->env, "respip");
 #ifdef CLIENT_SUBNET
-       subnet = mod_get_mem(&worker->env, "subnet");
+       subnet = mod_get_mem(&worker->env, "subnetcache");
 #endif /* CLIENT_SUBNET */
 #ifdef USE_IPSECMOD
        ipsecmod = mod_get_mem(&worker->env, "ipsecmod");
index 8720a52d6c6eb7389b3d3987d6f123d42ee53902..d08f18dbb1376ad4deaf5d66056782ffdda48a6d 100644 (file)
@@ -137,7 +137,7 @@ static void
 set_subnet_stats(struct worker* worker, struct ub_server_stats* svr,
        int reset)
 {
-       int m = modstack_find(&worker->env.mesh->mods, "subnet");
+       int m = modstack_find(&worker->env.mesh->mods, "subnetcache");
        struct subnet_env* sne;
        if(m == -1)
                return;
index b3b74c3af5f19383ecdd414645673338188fa58f..93215a2378c14f4e50c09bfc91b41c60371e08eb 100644 (file)
@@ -146,7 +146,7 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker),
                                (&worker->env, i);
 #ifdef CLIENT_SUBNET
                else if(strcmp(worker->env.mesh->mods.mod[i]->name,
-                       "subnet")==0)
+                       "subnetcache")==0)
                        subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
                                (&worker->env, i);
 #endif /* CLIENT_SUBNET */
@@ -205,7 +205,7 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker),
                                (&worker->env, i);
 #ifdef CLIENT_SUBNET
                else if(strcmp(worker->env.mesh->mods.mod[i]->name,
-                       "subnet")==0)
+                       "subnetcache")==0)
                        subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
                                (&worker->env, i);
 #endif /* CLIENT_SUBNET */
index 51039abf3ed8aab35f9e5bdb03baaa5b538dd129..6fd1f5ea638c695ea2c16b0aa54bee2670b42c0f 100644 (file)
@@ -281,7 +281,7 @@ void shm_main_run(struct worker *worker)
                shm_stat->mem.subnet = 0;
 #ifdef CLIENT_SUBNET
                shm_stat->mem.subnet = (long long)mod_get_mem(&worker->env,
-                       "subnet");
+                       "subnetcache");
 #endif
                /* ipsecmod mem value is available in shm, also when not enabled,
                 * to make the struct easier to memmap by other applications,