memset(&req, 0, sizeof(req));
strncpy(req.ifm_name, name, sizeof(req.ifm_name));
if (ioctl(sock, SIOCGIFMEDIA, &req) < 0) {
- if (errno == EOPNOTSUPP) {
+ if (errno == EOPNOTSUPP || errno == EINVAL) {
/*
* Not supported, so we can't provide any
* additional information. Assume that