diff --git a/lightningd/channel/channel.c b/lightningd/channel/channel.c index ff44385fd..f0264aa63 100644 --- a/lightningd/channel/channel.c +++ b/lightningd/channel/channel.c @@ -118,6 +118,9 @@ static struct io_plan *gossip_client_recv(struct io_conn *conn, if (type == WIRE_CHANNEL_ANNOUNCEMENT || type == WIRE_CHANNEL_UPDATE || type == WIRE_NODE_ANNOUNCEMENT) msg_enqueue(&peer->peer_out, msg); + else + status_failed(WIRE_CHANNEL_GOSSIP_BAD_MESSAGE, + "Got bad message from gossipd: %d", type); return daemon_conn_read_next(conn, dc); } @@ -1327,6 +1330,7 @@ static struct io_plan *req_in(struct io_conn *conn, struct daemon_conn *master) case WIRE_CHANNEL_BAD_COMMAND: case WIRE_CHANNEL_HSM_FAILED: case WIRE_CHANNEL_CRYPTO_FAILED: + case WIRE_CHANNEL_GOSSIP_BAD_MESSAGE: case WIRE_CHANNEL_INTERNAL_ERROR: case WIRE_CHANNEL_PEER_WRITE_FAILED: case WIRE_CHANNEL_PEER_READ_FAILED: diff --git a/lightningd/channel/channel_wire.csv b/lightningd/channel/channel_wire.csv index 86abd987e..f8aec6508 100644 --- a/lightningd/channel/channel_wire.csv +++ b/lightningd/channel/channel_wire.csv @@ -4,6 +4,7 @@ channel_bad_command,0x8000 channel_hsm_failed,0x8001 channel_crypto_failed,0x8002 channel_internal_error,0x8003 +channel_gossip_bad_message,0x8004 # These are due to peer. channel_peer_write_failed,0x8010 diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 93b44c63e..3e1321c1d 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -1476,6 +1476,7 @@ static int channel_msg(struct subd *sd, const u8 *msg, const int *unused) case WIRE_CHANNEL_BAD_COMMAND: case WIRE_CHANNEL_HSM_FAILED: case WIRE_CHANNEL_CRYPTO_FAILED: + case WIRE_CHANNEL_GOSSIP_BAD_MESSAGE: case WIRE_CHANNEL_INTERNAL_ERROR: case WIRE_CHANNEL_PEER_WRITE_FAILED: case WIRE_CHANNEL_PEER_READ_FAILED: