From 24f708ee7b9c1321d36a10e94a5e773a4a906a02 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 18 Nov 2019 10:57:18 +1030 Subject: [PATCH] lightningd: kill per-peer daemons if they claim a different peer id. Suggested-by: @cdecker Signed-off-by: Rusty Russell --- lightningd/log_status.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lightningd/log_status.c b/lightningd/log_status.c index e27f53e49..ccfc700ef 100644 --- a/lightningd/log_status.c +++ b/lightningd/log_status.c @@ -16,6 +16,11 @@ bool log_status_msg(struct log *log, * set it */ if (!node_id) node_id = suggested_node_id; + /* No per-peer daemon should claim a different peer! */ + else if (suggested_node_id + && !node_id_eq(node_id, suggested_node_id)) + return false; + if (level != LOG_IO_IN && level != LOG_IO_OUT) { call_notifier = (level == LOG_BROKEN || level == LOG_UNUSUAL)? true : false;