| 717 | } |
| 718 | |
| 719 | static bool handle_custommsg(struct daemon *daemon, |
| 720 | struct peer *peer, |
| 721 | const u8 *msg) |
| 722 | { |
| 723 | enum peer_wire type = fromwire_peektype(msg); |
| 724 | if (type % 2 == 1 && !peer_wire_is_defined(type)) { |
| 725 | /* The message is not part of the messages we know how to |
| 726 | * handle. Assuming this is a custommsg, we just forward it to the |
| 727 | * master. */ |
| 728 | status_peer_io(LOG_IO_IN, &peer->id, msg); |
| 729 | daemon_conn_send(daemon->master, |
| 730 | take(towire_connectd_custommsg_in(NULL, |
| 731 | &peer->id, |
| 732 | msg))); |
| 733 | return true; |
| 734 | } else { |
| 735 | return false; |
| 736 | } |
| 737 | } |
| 738 | |
| 739 | /* We handle pings and gossip messages. */ |
| 740 | static bool handle_message_locally(struct peer *peer, const u8 *msg) |
no test coverage detected