From a688f47ed7a11e4e18df2d243e629eba94c4eaff Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 25 Nov 2023 08:14:43 +0000 Subject: [PATCH] Document that "localhost" only resolves to the loopback addresses. prodding pb OK phessler, sthen Input & OK jmc --- share/man/man5/hosts.5 | 7 +++++-- share/man/man5/resolv.conf.5 | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/share/man/man5/hosts.5 b/share/man/man5/hosts.5 index 8b3b7b699a8..c15d19b7bc2 100644 --- a/share/man/man5/hosts.5 +++ b/share/man/man5/hosts.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hosts.5,v 1.26 2022/03/31 17:27:23 naddy Exp $ +.\" $OpenBSD: hosts.5,v 1.27 2023/11/25 08:14:43 florian Exp $ .\" $NetBSD: hosts.5,v 1.4 1994/11/30 19:31:20 jtc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)hosts.5 8.2 (Berkeley) 12/11/93 .\" -.Dd $Mdocdate: March 31 2022 $ +.Dd $Mdocdate: November 25 2023 $ .Dt HOSTS 5 .Os .Sh NAME @@ -76,6 +76,9 @@ dot notation (IPv4) or colon separated notation (IPv6) as described in .Xr inet_pton 3 . Host names may contain any printable character other than a field delimiter, newline, or comment character. +.Pp +The host "localhost" and all names underneath the localhost domain will +always resolve to the loopback addresses 127.0.0.1 or ::1. .Sh FILES .Bl -tag -width /etc/hosts -compact .It Pa /etc/hosts diff --git a/share/man/man5/resolv.conf.5 b/share/man/man5/resolv.conf.5 index ed3b8f660e4..907fd89696e 100644 --- a/share/man/man5/resolv.conf.5 +++ b/share/man/man5/resolv.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: resolv.conf.5,v 1.64 2021/11/23 06:58:36 jmc Exp $ +.\" $OpenBSD: resolv.conf.5,v 1.65 2023/11/25 08:14:43 florian Exp $ .\" $NetBSD: resolv.conf.5,v 1.7 1996/03/06 18:22:16 scottr Exp $ .\" .\" Copyright (c) 1986, 1991 The Regents of the University of California. @@ -30,7 +30,7 @@ .\" .\" @(#)resolver.5 5.12 (Berkeley) 5/10/91 .\" -.Dd $Mdocdate: November 23 2021 $ +.Dd $Mdocdate: November 25 2023 $ .Dt RESOLV.CONF 5 .Os .Sh NAME @@ -50,6 +50,9 @@ file does not exist, only the local host file will be consulted, i.e. the Domain Name System will not be used to resolve hosts. .Pp +The host "localhost" and all names underneath the localhost domain will +always resolve to the loopback addresses 127.0.0.1 or ::1. +.Pp The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver information. A resolv.conf file is not required for some setups, so this file is optional. -- 2.20.1