diff --git a/src/mctp.c b/src/mctp.c index 0dd13b3..c136e21 100644 --- a/src/mctp.c +++ b/src/mctp.c @@ -1309,6 +1309,7 @@ int main(int argc, char **argv) if (!cmd) errx(EXIT_FAILURE, "no such command '%s'", cmdname); + mctp_ops_init(); ctx->nl = mctp_nl_new(ctx->verbose); if (!ctx->nl) errx(EXIT_FAILURE, "Error creating netlink object"); diff --git a/src/mctpd.c b/src/mctpd.c index 9b30e1c..eadd354 100644 --- a/src/mctpd.c +++ b/src/mctpd.c @@ -720,6 +720,9 @@ static int cb_listen_control_msg(sd_event_source *s, int sd, uint32_t revents, if (rc < 0) goto out; + if (rc == 0) + errx(EXIT_FAILURE, "Control socket returned EOF"); + if (addr.smctp_base.smctp_type != MCTP_CTRL_HDR_MSG_TYPE) { warnx("BUG: Wrong message type for listen socket"); rc = -EINVAL;