Skip to content

Commit

Permalink
channeld: fix crash with pre-TLV peers.
Browse files Browse the repository at this point in the history
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: ElementsProject#7486
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Sep 7, 2024
1 parent 873e8b4 commit ca94188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion channeld/channeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -5158,7 +5158,7 @@ static void peer_reconnect(struct peer *peer,
} else if (pending_updates(peer->channel, LOCAL, true)
|| pending_updates(peer->channel, REMOTE, true)) {
status_debug("No upgrade: pending changes");
} else {
} else if (send_tlvs && recv_tlvs) {
const struct tlv_channel_reestablish_tlvs *initr, *ninitr;
const u8 *type;

Expand Down

0 comments on commit ca94188

Please sign in to comment.