Linux-man Archive on lore.kernel.org
 help / color / Atom feed
From: Thomas Bartelsmeier <t.bartelsmeier@gmail.com>
To: mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org, linux-kernel@i4.cs.fau.de,
	Thomas Bartelsmeier <t.bartelsmeier@gmail.com>
Subject: [PATCH] hosts.5: Clarify capability for IPv6 outside of examples
Date: Mon, 29 Jun 2020 17:07:16 +0200
Message-ID: <20200629150716.3086-1-t.bartelsmeier@gmail.com> (raw)

Resolves https://bugzilla.kernel.org/show_bug.cgi?id=208279

Signed-off-by: Thomas Bartelsmeier <t.bartelsmeier@gmail.com>
---

The first addition should be relatively uncontroversial.
As the prevalence of IPv6 continues to increase, it is about
time to not only mention the IPv6 compatibility of the hosts
file in the examples at the very bottom of the man page.

The second addition is in relation to the Bugzilla report.
It is a simple statement which is true even for the default
version of the hosts file and its two entries for localhost.
However, I do not consider it necessary for any casual user to
add both IPv4 and IPv6 addresses for any hosts.
Therefore, I cautiously did not change the wording criticized in
the bug report in case of any possible negative interactions.
As a result, the second addition is meant to be for completeness
and for use by people who know they actually need this.

 man5/hosts.5 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/man5/hosts.5 b/man5/hosts.5
index cb055f5f6..1230f9303 100644
--- a/man5/hosts.5
+++ b/man5/hosts.5
@@ -42,6 +42,7 @@ line should be present with the following information:
 IP_address canonical_hostname [aliases...]
 .RE
 .PP
+The IP address can conform to either IPv4 or IPv6.
 Fields of the entry are separated by any number of blanks and/or
 tab characters.
 Text from a "#" character until the end of the line is
@@ -53,6 +54,8 @@ alphabetic character and end with an alphanumeric character.
 Optional aliases provide for name changes, alternate spellings,
 shorter hostnames, or generic hostnames (for example,
 .IR localhost ).
+If required, a host may have two separate entries in this file;
+one for each version of the Internet Protocol (IPv4 and IPv6).
 .PP
 The Berkeley Internet Name Domain (BIND) Server implements the
 Internet name server for UNIX systems.
-- 
2.17.1


             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 15:07 Thomas Bartelsmeier [this message]
2020-06-30  7:34 ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200629150716.3086-1-t.bartelsmeier@gmail.com \
    --to=t.bartelsmeier@gmail.com \
    --cc=linux-kernel@i4.cs.fau.de \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git