read_peer_msg: ignore errors not destined for this channel.

We quoted the spec, but somehow the implementation disappeared.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-02-19 11:36:15 +10:30
parent 201d498e39
commit 65ff5f8bb1

View file

@ -85,7 +85,8 @@ u8 *read_peer_msg_(const tal_t *ctx,
* message:
* - MUST ignore the message.
*/
err_pkt(err, &chanid, arg);
if (structeq(&chanid, channel) || channel_id_is_all(&chanid))
err_pkt(err, &chanid, arg);
return tal_free(msg);
}