Decrease log severity to debug if a protocol is not supported by the

kernel. This avoids "rpcbind: cannot create socket for tcp6" messages
at startup on IPv4-only kernels.
This commit is contained in:
martin 2004-05-20 12:22:23 +00:00
parent 479d5e8fca
commit ad1c3f227e

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpcbind.c,v 1.6 2003/10/29 17:51:33 fvdl Exp $ */ /* $NetBSD: rpcbind.c,v 1.7 2004/05/20 12:22:23 martin Exp $ */
/* /*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -249,7 +249,8 @@ init_transport(struct netconfig *nconf)
* XXX - using RPC library internal functions. * XXX - using RPC library internal functions.
*/ */
if ((fd = __rpc_nconf2fd(nconf)) < 0) { if ((fd = __rpc_nconf2fd(nconf)) < 0) {
syslog(LOG_ERR, "cannot create socket for %s", nconf->nc_netid); int non_fatal = errno == EPROTONOSUPPORT;
syslog(non_fatal?LOG_DEBUG:LOG_ERR, "cannot create socket for %s", nconf->nc_netid);
return (1); return (1);
} }