aboutsummaryrefslogtreecommitdiff
path: root/package/network
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2023-11-18 16:29:09 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2023-11-26 19:58:35 +0100
commit711dcb77630e96e75413b5cdbe3ddb5432f394f6 (patch)
tree764af206e66102598ec7dd68ac5e681ad09572c2 /package/network
parent4e09722a68825274048806c37a405eb3ee25500c (diff)
dnsmasq: mark global ubus context as closed after fork
If the dnsmasq process forks to handle TCP connections, it closes the ubus context. But instead of changing the daemon wide pointer to NULL, only the local variable was adjusted - and this portion of the code was even dropped (dead store) by some optimizing compilers. It makes more sense to change the daemon->ubus pointer because various functions are already checking it for NULL. It is also the behavior which ubus_destroy() implements. Fixes: d8b33dad0bb7 ("dnsmasq: add support for monitoring and modifying dns lookup results via ubus") Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/dnsmasq/patches/200-ubus_dns.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/patches/200-ubus_dns.patch b/package/network/services/dnsmasq/patches/200-ubus_dns.patch
index 8a70bb8bdf..ccbe70ab9c 100644
--- a/package/network/services/dnsmasq/patches/200-ubus_dns.patch
+++ b/package/network/services/dnsmasq/patches/200-ubus_dns.patch
@@ -210,7 +210,7 @@
+ return;
+
+ ubus_free(ubus);
-+ ubus = NULL;
++ daemon->ubus = NULL;
+}
+
static int ubus_handle_metrics(struct ubus_context *ctx, struct ubus_object *obj,