diff options
Diffstat (limited to 'usr.sbin/rpcbind')
-rw-r--r-- | usr.sbin/rpcbind/rpcbind.c | 4 | ||||
-rw-r--r-- | usr.sbin/rpcbind/util.c | 24 |
2 files changed, 2 insertions, 26 deletions
diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c index 3d11af1..fb6c99d 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/rpcbind/util.c b/usr.sbin/rpcbind/util.c index 16e6f70..8ddb13e 100644 --- a/usr.sbin/rpcbind/util.c +++ b/usr.sbin/rpcbind/util.c @@ -57,9 +57,6 @@ static struct sockaddr_in6 *local_in6; #endif static int bitmaskcmp(void *, void *, void *, int); -#ifdef INET6 -static void in6_fillscopeid(struct sockaddr_in6 *); -#endif /* * For all bits set in "mask", compare the corresponding bits in @@ -79,26 +76,6 @@ bitmaskcmp(void *dst, void *src, void *mask, int bytelen) } /* - * Similar to code in ifconfig.c. Fill in the scope ID for link-local - * addresses returned by getifaddrs(). - */ -#ifdef INET6 -static void -in6_fillscopeid(struct sockaddr_in6 *sin6) -{ - u_int16_t ifindex; - - if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { - ifindex = ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]); - if (sin6->sin6_scope_id == 0 && ifindex != 0) { - sin6->sin6_scope_id = ifindex; - *(u_int16_t *)&sin6->sin6_addr.s6_addr[2] = 0; - } - } -} -#endif - -/* * Find a server address that can be used by `caller' to contact * the local service specified by `serv_uaddr'. If `clnt_uaddr' is * non-NULL, it is used instead of `caller' as a hint suggesting @@ -202,7 +179,6 @@ addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr, * a link-local address then use the scope id to see * which one. */ - in6_fillscopeid(SA2SIN6(ifsa)); if (IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(ifsa)) && IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(caller_sa)) && IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(hint_sa))) { |