Currently, we're checking the return value of read_message against 0 to detect EOF, but this isn't a length value. This means that any successful read will hit the errx.
Instead, check the actual length, and improve the read_message case where we see an EOF from the recvmsg().
Fixes: ea5c9a3 ("mctpd: Exit on control socket EOF")
Currently, we're checking the return value of read_message against 0 to detect EOF, but this isn't a length value. This means that any successful read will hit the errx.
Instead, check the actual length, and improve the read_message case where we see an EOF from the recvmsg().
Fixes: ea5c9a3 ("mctpd: Exit on control socket EOF")