diff --git a/connectd/multiplex.c b/connectd/multiplex.c index 1f8a84263020..e4f872f47884 100644 --- a/connectd/multiplex.c +++ b/connectd/multiplex.c @@ -627,7 +627,10 @@ static bool handle_custommsg(struct daemon *daemon, const u8 *msg) { enum peer_wire type = fromwire_peektype(msg); - if (type % 2 == 1 && !peer_wire_is_defined(type)) { + + /* Making an exception for peer_storage and + * your_peer_storage type of message. */ + if (type % 2 == 1 && (type == 7 || type == 9 || !peer_wire_is_defined(type))) { /* The message is not part of the messages we know how to * handle. Assuming this is a custommsg, we just forward it to the * master. */ diff --git a/lightningd/connect_control.c b/lightningd/connect_control.c index 620231a6bb1e..cfbdf0b91191 100644 --- a/lightningd/connect_control.c +++ b/lightningd/connect_control.c @@ -655,7 +655,8 @@ static struct command_result *json_sendcustommsg(struct command *cmd, return command_param_failed(); type = fromwire_peektype(msg); - if (peer_wire_is_defined(type)) { + /* Allow exception for peer_storage and your_peer_storage msg */ + if (type != 7 && type != 9 && peer_wire_is_defined(type)) { return command_fail( cmd, JSONRPC2_INVALID_REQUEST, "Cannot send messages of type %d (%s). It is not possible "