diff --git a/connectd/multiplex.c b/connectd/multiplex.c index 3332f1e4c..72db922e9 100644 --- a/connectd/multiplex.c +++ b/connectd/multiplex.c @@ -723,7 +723,7 @@ 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)) { + if (type % 2 == 1 && !peer_wire_is_internal(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 1632e0387..93c617a0c 100644 --- a/lightningd/connect_control.c +++ b/lightningd/connect_control.c @@ -752,7 +752,9 @@ static struct command_result *json_sendcustommsg(struct command *cmd, return command_param_failed(); type = fromwire_peektype(msg); - if (peer_wire_is_defined(type)) { + + /* Allow peer_storage and your_peer_storage msgtypes */ + if (peer_wire_is_internal(type)) { return command_fail( cmd, JSONRPC2_INVALID_REQUEST, "Cannot send messages of type %d (%s). It is not possible "