diff --git a/src/ctl.c b/src/ctl.c index cbc708f..a8cb1d1 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -23,7 +23,7 @@ ctl_reply(int fd, struct ctl_msg *res, struct ctl_msg *req) return -1; if (res->type != req->type || !res->reply) { - errno = EINTR; + errno = EINVAL; return -1; } diff --git a/src/iface.c b/src/iface.c index c39af08..a0644d9 100644 --- a/src/iface.c +++ b/src/iface.c @@ -20,7 +20,7 @@ iface_set_mtu(const char *dev_name, size_t mtu) int ret = snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", dev_name); if (ret <= 0 || (size_t)ret >= sizeof(ifr.ifr_name)) { - errno = EINTR; + errno = EINVAL; return -1; }