From ad1c3f227ef3458cf835f747d7700d008733f726 Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 20 May 2004 12:22:23 +0000 Subject: [PATCH] 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. --- usr.sbin/rpcbind/rpcbind.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c index 5277f2a1fc63..bea9c55ed2c1 100644 --- a/usr.sbin/rpcbind/rpcbind.c +++ b/usr.sbin/rpcbind/rpcbind.c @@ -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 @@ -249,7 +249,8 @@ init_transport(struct netconfig *nconf) * XXX - using RPC library internal functions. */ 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); }