diff options
author | kevlo <kevlo@FreeBSD.org> | 2012-12-21 15:54:13 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2012-12-21 15:54:13 +0000 |
commit | 804c67a4867afb8b7ef41a3ade748cab870b788c (patch) | |
tree | 978bc55596b12d6142055e42519088a4901b8bba /sbin/ifconfig | |
parent | 6547dbdbaff0d10e29457c19876b28de348a0643 (diff) | |
download | FreeBSD-src-804c67a4867afb8b7ef41a3ade748cab870b788c.zip FreeBSD-src-804c67a4867afb8b7ef41a3ade748cab870b788c.tar.gz |
Fix socket calls on error post-r243965.
Submitted by: Garrett Cooper
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/af_nd6.c | 2 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index 654e2d9..80065f6 100644 --- a/sbin/ifconfig/af_nd6.c +++ b/sbin/ifconfig/af_nd6.c @@ -148,7 +148,7 @@ nd6_status(int s) memset(&nd, 0, sizeof(nd)); strncpy(nd.ifname, ifr.ifr_name, sizeof(nd.ifname)); if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { - if (errno != EPROTONOSUPPORT) + if (errno != EAFNOSUPPORT) warn("socket(AF_INET6, SOCK_DGRAM)"); return; } diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 870acdd..983e21f 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -520,7 +520,7 @@ top: AF_LOCAL : afp->af_af; if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0 && - (uafp != NULL || errno != EPROTONOSUPPORT || + (uafp != NULL || errno != EAFNOSUPPORT || (s = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0)) err(1, "socket(family %u,SOCK_DGRAM", ifr.ifr_addr.sa_family); |