Skip to content

Commit 78b9ccf

Browse files
rustyrussellvincenzopalazzo
authored andcommitted
channeld: fix crash with pre-TLV peers.
send_tlvs is NULL if no special features are supported, and peer sets `next_to_send` anyway: ``` 0x5ed1c6719538 peer_reconnect channeld/channeld.c:5205 0x5ed1c6719dab init_channel channeld/channeld.c:5959 0x5ed1c6719f04 main channeld/channeld.c:6005 ``` Backport: v24.08 Fixes: #7486 Signed-off-by: Rusty Russell <[email protected]>
1 parent 873e8b4 commit 78b9ccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

channeld/channeld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5158,7 +5158,7 @@ static void peer_reconnect(struct peer *peer,
51585158
} else if (pending_updates(peer->channel, LOCAL, true)
51595159
|| pending_updates(peer->channel, REMOTE, true)) {
51605160
status_debug("No upgrade: pending changes");
5161-
} else {
5161+
} else if (send_tlvs && recv_tlvs) {
51625162
const struct tlv_channel_reestablish_tlvs *initr, *ninitr;
51635163
const u8 *type;
51645164

0 commit comments

Comments
 (0)