Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/inetd correct extremely unfriendly error message wh...
details: https://anonhg.NetBSD.org/src/rev/a55959007765
branches: trunk
changeset: 486087:a55959007765
user: itojun <itojun%NetBSD.org@localhost>
date: Sat May 13 02:56:47 2000 +0000
description:
correct extremely unfriendly error message when the kernel does not
support the address family (like including "tcp6" in inetd.conf, on
non-IPv6 kernel).
was:
inetd[185]: ftp/tcp6: *: hostname nor servname provided, or not known
now:
inetd[315]: ftp/tcp6: *: the address family is not supported by the kernel
diffstat:
usr.sbin/inetd/inetd.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r 5d8afca0ada2 -r a55959007765 usr.sbin/inetd/inetd.c
--- a/usr.sbin/inetd/inetd.c Sat May 13 00:57:17 2000 +0000
+++ b/usr.sbin/inetd/inetd.c Sat May 13 02:56:47 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inetd.c,v 1.59 2000/03/06 19:52:13 itojun Exp $ */
+/* $NetBSD: inetd.c,v 1.60 2000/05/13 02:56:47 itojun Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
#if 0
static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94";
#else
-__RCSID("$NetBSD: inetd.c,v 1.59 2000/03/06 19:52:13 itojun Exp $");
+__RCSID("$NetBSD: inetd.c,v 1.60 2000/05/13 02:56:47 itojun Exp $");
#endif
#endif /* not lint */
@@ -906,9 +906,18 @@
port = sep->se_service;
error = getaddrinfo(host, port, &hints, &res);
if (error) {
- syslog(LOG_ERR, "%s/%s: %s: %s",
- sep->se_service, sep->se_proto,
- sep->se_hostaddr, gai_strerror(error));
+ if (host == NULL) {
+ syslog(LOG_ERR, "%s/%s: %s: "
+ "the address family is not "
+ "supported by the kernel",
+ sep->se_service, sep->se_proto,
+ sep->se_hostaddr);
+ } else {
+ syslog(LOG_ERR, "%s/%s: %s: %s",
+ sep->se_service, sep->se_proto,
+ sep->se_hostaddr,
+ gai_strerror(error));
+ }
sep->se_checked = 0;
continue;
}
Home |
Main Index |
Thread Index |
Old Index