Corrected code to acquire mtu under Solaris.
This commit is contained in:
parent
8b39cea352
commit
761fce5261
|
@ -821,7 +821,11 @@ DWORD getInterfaceMtuByName(const char *name, PDWORD mtu)
|
||||||
if ((ioctl(fd, SIOCGIFMTU, &ifr)))
|
if ((ioctl(fd, SIOCGIFMTU, &ifr)))
|
||||||
ret = ERROR_INVALID_DATA;
|
ret = ERROR_INVALID_DATA;
|
||||||
else {
|
else {
|
||||||
|
#ifndef __sun
|
||||||
*mtu = ifr.ifr_mtu;
|
*mtu = ifr.ifr_mtu;
|
||||||
|
#else
|
||||||
|
*mtu = ifr.ifr_metric;
|
||||||
|
#endif
|
||||||
ret = NO_ERROR;
|
ret = NO_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue