From 443c0c6389006210e3404f7650cde4ea62e56f7b Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 12 Dec 2023 14:13:31 +0100 Subject: [PATCH] subd: Do not send feerate updates to non-channeld subds Turns out we were sending feerate updates to daemons that do not understand it. Don't do that! Closes #6932 Changelog-Fixed: channeld: We could crash `closingd` by sending it a `channeld` message --- lightningd/channel_control.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lightningd/channel_control.c b/lightningd/channel_control.c index 7018e63457aa..ae57e891a77b 100644 --- a/lightningd/channel_control.c +++ b/lightningd/channel_control.c @@ -93,6 +93,11 @@ static void try_update_feerates(struct lightningd *ld, struct channel *channel) if (!channel->owner) return; + /* The feerate message is only understood by `channeld` so + * don't attempt to send it to other subds*/ + if (!streq(channel->owner->name, "channeld")) + return; + channel_update_feerates(ld, channel); }