Skip to content

Commit a65c697

Browse files
rustyrussellsangbida
authored andcommitted
connectd: rescue constant message size feature by exploiting option 154 (Eclair).
I 🧡 tbast! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 52b7004 commit a65c697

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

connectd/multiplex.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,16 @@ static bool have_empty_encrypted_queue(const struct peer *peer)
485485
* "no reply" ping messages. This was fixed in (the upcoming) v21, which
486486
* Laolu pointed out also supports onion messages. Hence we use that
487487
* to detect if we should pad packets. */
488+
489+
/* Funnier story: Eclair had the same bug, and have also committed a
490+
* fix. They currently use a boutique feature bit 154, which is
491+
* "Phoenix-specific custom splices implementation" which Tbast
492+
* indicates is being phased out. So if they offer that, don't send
493+
* such pings. */
488494
static bool use_uniform_writes(const struct peer *peer)
489495
{
490-
return feature_offered(peer->their_features, OPT_ONION_MESSAGES);
496+
return feature_offered(peer->their_features, OPT_ONION_MESSAGES)
497+
&& !feature_offered(peer->their_features, 154);
491498
}
492499

493500
/* (Continue) writing the encrypted_peer_out array */

0 commit comments

Comments
 (0)