Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net Return EAI_NODATA, not EAI_NONAME, for nonexist...
details: https://anonhg.NetBSD.org/src/rev/c559ae9fe409
branches: trunk
changeset: 446639:c559ae9fe409
user: dholland <dholland%NetBSD.org@localhost>
date: Thu Dec 13 04:30:55 2018 +0000
description:
Return EAI_NODATA, not EAI_NONAME, for nonexistent hosts.
This causes e.g. "ssh nosuchname" to print "No address associated with
hostname", which is correct, rather than "hostname nor servname
provided, or not known", which is not.
diffstat:
lib/libc/net/getaddrinfo.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 0bcb903bf2f1 -r c559ae9fe409 lib/libc/net/getaddrinfo.c
--- a/lib/libc/net/getaddrinfo.c Thu Dec 13 04:29:18 2018 +0000
+++ b/lib/libc/net/getaddrinfo.c Thu Dec 13 04:30:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getaddrinfo.c,v 1.117 2017/12/28 15:12:15 christos Exp $ */
+/* $NetBSD: getaddrinfo.c,v 1.118 2018/12/13 04:30:55 dholland Exp $ */
/* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */
/*
@@ -55,7 +55,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getaddrinfo.c,v 1.117 2017/12/28 15:12:15 christos Exp $");
+__RCSID("$NetBSD: getaddrinfo.c,v 1.118 2018/12/13 04:30:55 dholland Exp $");
#endif /* LIBC_SCCS and not lint */
#ifndef RUMP_ACTION
@@ -1188,7 +1188,7 @@
error = EAI_FAIL;
goto free;
case NS_NOTFOUND:
- error = EAI_NONAME;
+ error = EAI_NODATA;
goto free;
case NS_SUCCESS:
error = 0;
Home |
Main Index |
Thread Index |
Old Index