Repository navigation
Commit 0b7fb74
committed
mctp-netlink: Return -errno from mctp_nl_send() on send failure
mctp_nl_send() has two error paths. When the kernel rejects the
request, handle_nlmsg_ack() returns a negative errno. When sendto()
itself fails, mctp_nl_send() returns sendto()'s -1 and leaves the
reason in errno.
Callers expect a negative errno. For example, mctpd prints
strerror(-rc) when mctp_nl_route_add() or mctp_nl_route_del() fails,
so a failed sendto() is logged as "Operation not permitted" (EPERM)
whatever the real error was.
Return -errno from the sendto() path too, so both paths report errors
the same way.
Signed-off-by: Kenny PH Hsieh <Kenny_Hsieh@jabil.com>1 parent e48506b commit 0b7fb74
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
0 commit comments