diff options
-rw-r--r-- | bin/date/netdate.c | 2 | ||||
-rw-r--r-- | lib/libnetgraph/sock.c | 4 | ||||
-rw-r--r-- | sbin/hastd/parse.y | 2 | ||||
-rw-r--r-- | sbin/ifconfig/af_nd6.c | 2 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 2 | ||||
-rw-r--r-- | usr.sbin/mountd/mountd.c | 2 | ||||
-rw-r--r-- | usr.sbin/mtest/mtest.c | 4 | ||||
-rw-r--r-- | usr.sbin/rpcbind/rpcbind.c | 4 | ||||
-rw-r--r-- | usr.sbin/ypserv/yp_main.c | 2 |
9 files changed, 12 insertions, 12 deletions
diff --git a/bin/date/netdate.c b/bin/date/netdate.c index b085be4db68f..e506e6d0ec18 100644 --- a/bin/date/netdate.c +++ b/bin/date/netdate.c @@ -85,7 +85,7 @@ netsettime(time_t tval) dest.sin_addr.s_addr = htonl((u_long)INADDR_ANY); s = socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) { - if (errno != EPROTONOSUPPORT) + if (errno != EAFNOSUPPORT) warn("timed"); return (retval = 2); } diff --git a/lib/libnetgraph/sock.c b/lib/libnetgraph/sock.c index fca3900913df..5f9f563fe50c 100644 --- a/lib/libnetgraph/sock.c +++ b/lib/libnetgraph/sock.c @@ -71,10 +71,10 @@ NgMkSockNode(const char *name, int *csp, int *dsp) name = NULL; /* Create control socket; this also creates the netgraph node. - If we get an EPROTONOSUPPORT then the socket node type is + If we get an EAFNOSUPPORT then the socket node type is not loaded, so load it and try again. */ if ((cs = socket(AF_NETGRAPH, SOCK_DGRAM, NG_CONTROL)) < 0) { - if (errno == EPROTONOSUPPORT) { + if (errno == EAFNOSUPPORT) { if (kldload(NG_SOCKET_KLD) < 0) { errnosv = errno; if (_gNgDebugLevel >= 1) diff --git a/sbin/hastd/parse.y b/sbin/hastd/parse.y index a20b61aa1f5a..04ea7ab2513e 100644 --- a/sbin/hastd/parse.y +++ b/sbin/hastd/parse.y @@ -769,7 +769,7 @@ family_supported(int family) int sock; sock = socket(family, SOCK_STREAM, 0); - if (sock == -1 && errno == EPROTONOSUPPORT) + if (sock == -1 && errno == EAFNOSUPPORT) return (false); if (sock >= 0) (void)close(sock); diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index 654e2d97fe0b..80065f6e6153 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 870acdd0445c..983e21fc0401 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); diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 543fc14f9cc3..bc290d6d9cfe 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -649,7 +649,7 @@ create_service(struct netconfig *nconf) */ if ((fd = __rpc_nconf2fd(nconf)) < 0) { int non_fatal = 0; - if (errno == EPROTONOSUPPORT && + if (errno == EAFNOSUPPORT && nconf->nc_semantics != NC_TPI_CLTS) non_fatal = 1; diff --git a/usr.sbin/mtest/mtest.c b/usr.sbin/mtest/mtest.c index 60f7e09626b2..a28fab770e2a 100644 --- a/usr.sbin/mtest/mtest.c +++ b/usr.sbin/mtest/mtest.c @@ -204,12 +204,12 @@ main(int argc, char **argv) s6 = -1; #ifdef INET s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (s == -1 && errno != EPROTONOSUPPORT) + if (s == -1 && errno != EAFNOSUPPORT) err(1, "can't open IPv4 socket"); #endif #ifdef INET6 s6 = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); - if (s6 == -1 && errno != EPROTONOSUPPORT) + if (s6 == -1 && errno != EAFNOSUPPORT) err(1, "can't open IPv6 socket"); #endif if (s == -1 && s6 == -1) diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c index 3d11af15f816..fb6c99d5e536 100644 --- a/usr.sbin/rpcbind/rpcbind.c +++ b/usr.sbin/rpcbind/rpcbind.c @@ -289,7 +289,7 @@ init_transport(struct netconfig *nconf) */ if ((fd = __rpc_nconf2fd(nconf)) < 0) { int non_fatal = 0; - if (errno == EPROTONOSUPPORT) + if (errno == EAFNOSUPPORT) non_fatal = 1; syslog(non_fatal?LOG_DEBUG:LOG_ERR, "cannot create socket for %s", nconf->nc_netid); @@ -352,7 +352,7 @@ init_transport(struct netconfig *nconf) */ if ((fd = __rpc_nconf2fd(nconf)) < 0) { int non_fatal = 0; - if (errno == EPROTONOSUPPORT && + if (errno == EAFNOSUPPORT && nconf->nc_semantics != NC_TPI_CLTS) non_fatal = 1; syslog(non_fatal ? LOG_DEBUG : LOG_ERR, diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c index 69dae295c8f7..60bd6a169129 100644 --- a/usr.sbin/ypserv/yp_main.c +++ b/usr.sbin/ypserv/yp_main.c @@ -292,7 +292,7 @@ create_service(const int sock, const struct netconfig *nconf, s = __rpc_nconf2fd(nconf); if (s < 0) { - if (errno == EPROTONOSUPPORT) + if (errno == EAFNOSUPPORT) _msgout("unsupported" " transport: %s", nconf->nc_netid); |