mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 14:55:12 +00:00
added ENXIO like EADDRNOTAVAIL
This commit is contained in:
@@ -173,7 +173,7 @@ void load_interfaces()
|
|||||||
STRSET(SIOCGIFADDR, (caddr_t)ifr, sizeof(ifreq));
|
STRSET(SIOCGIFADDR, (caddr_t)ifr, sizeof(ifreq));
|
||||||
if (ioctl(sock, I_STR, &strioctl) < 0) {
|
if (ioctl(sock, I_STR, &strioctl) < 0) {
|
||||||
/* non-fatal error if interface is down or not supported */
|
/* non-fatal error if interface is down or not supported */
|
||||||
if (errno == EADDRNOTAVAIL || errno == EAFNOSUPPORT)
|
if (errno == EADDRNOTAVAIL || errno == ENXIO || errno == EAFNOSUPPORT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
(void) fprintf(stderr, "%s: Error, ioctl: SIOCGIFADDR ", Argv[0]);
|
(void) fprintf(stderr, "%s: Error, ioctl: SIOCGIFADDR ", Argv[0]);
|
||||||
@@ -189,7 +189,7 @@ void load_interfaces()
|
|||||||
/* get the ip address */
|
/* get the ip address */
|
||||||
if (ioctl(sock, SIOCGIFADDR, (caddr_t)(&ifreq))) {
|
if (ioctl(sock, SIOCGIFADDR, (caddr_t)(&ifreq))) {
|
||||||
/* non-fatal error if interface is down or not supported */
|
/* non-fatal error if interface is down or not supported */
|
||||||
if (errno == EADDRNOTAVAIL || errno == EAFNOSUPPORT)
|
if (errno == EADDRNOTAVAIL || errno == ENXIO || errno == EAFNOSUPPORT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
(void) fprintf(stderr, "%s: Error, ioctl: SIOCGIFADDR ", Argv[0]);
|
(void) fprintf(stderr, "%s: Error, ioctl: SIOCGIFADDR ", Argv[0]);
|
||||||
|
Reference in New Issue
Block a user