]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- fast-reload, for nonthreaded, the unbound-control commands forward,
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 4 Jan 2024 16:01:21 +0000 (17:01 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 4 Jan 2024 16:01:21 +0000 (17:01 +0100)
  forward_add and forward_delete should be distributed to other processes,
  but when threaded, they should not be distributed to other threads because
  the structure is not thread specific any more.

daemon/remote.c

index bc275ab9ef9574bd5316036f6bea91ef5e02f33f..0593a99b84d4441402150e2b1b879ee10e4e6f4b 100644 (file)
@@ -3143,12 +3143,6 @@ execute_cmd(struct daemon_remote* rc, struct rc_state* s, RES* ssl, char* cmd,
                if(rc) distribute_cmd(rc, ssl, cmd);
                do_stub_remove(ssl, worker, skipwhite(p+11));
                return;
-       } else if(cmdcmp(p, "forward_add", 11)) {
-               do_forward_add(ssl, worker, skipwhite(p+11));
-               return;
-       } else if(cmdcmp(p, "forward_remove", 14)) {
-               do_forward_remove(ssl, worker, skipwhite(p+14));
-               return;
        } else if(cmdcmp(p, "insecure_add", 12)) {
                /* must always distribute this cmd */
                if(rc) distribute_cmd(rc, ssl, cmd);
@@ -3159,9 +3153,6 @@ execute_cmd(struct daemon_remote* rc, struct rc_state* s, RES* ssl, char* cmd,
                if(rc) distribute_cmd(rc, ssl, cmd);
                do_insecure_remove(ssl, worker, skipwhite(p+15));
                return;
-       } else if(cmdcmp(p, "forward", 7)) {
-               do_forward(ssl, worker, skipwhite(p+7));
-               return;
        } else if(cmdcmp(p, "flush_stats", 11)) {
                /* must always distribute this cmd */
                if(rc) distribute_cmd(rc, ssl, cmd);
@@ -3203,6 +3194,12 @@ execute_cmd(struct daemon_remote* rc, struct rc_state* s, RES* ssl, char* cmd,
                do_data_add(ssl, worker->daemon->local_zones, skipwhite(p+10));
        } else if(cmdcmp(p, "local_datas", 11)) {
                do_datas_add(ssl, worker->daemon->local_zones);
+       } else if(cmdcmp(p, "forward_add", 11)) {
+               do_forward_add(ssl, worker, skipwhite(p+11));
+       } else if(cmdcmp(p, "forward_remove", 14)) {
+               do_forward_remove(ssl, worker, skipwhite(p+14));
+       } else if(cmdcmp(p, "forward", 7)) {
+               do_forward(ssl, worker, skipwhite(p+7));
        } else if(cmdcmp(p, "view_local_zone_remove", 22)) {
                do_view_zone_remove(ssl, worker, skipwhite(p+22));
        } else if(cmdcmp(p, "view_local_zone", 15)) {