summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-08-03 05:55:21 +0000
committerume <ume@FreeBSD.org>2003-08-03 05:55:21 +0000
commit697f428114a3cc2de7307efefe55db5f47f41d83 (patch)
treeb81a1c4388ec2fecf969503a4b6c1f01c3bbc3a0 /usr.sbin/sade
parentaed962b0e91a64589184a088d53bf5718c582525 (diff)
downloadFreeBSD-src-697f428114a3cc2de7307efefe55db5f47f41d83.zip
FreeBSD-src-697f428114a3cc2de7307efefe55db5f47f41d83.tar.gz
Always put an entry for ::1. It may avoid useless DNS lookup
for localhost. MFC after: 3 days
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/config.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index 8709798..aa8d677 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -817,16 +817,13 @@ skip:
if (!fp)
return DITEM_FAILURE;
/* Add an entry for localhost */
- if (!variable_cmp(VAR_IPV6_ENABLE, "YES")) {
- if (dp)
- fprintf(fp, "::1\t\t\tlocalhost.%s localhost\n", dp);
- else
- fprintf(fp, "::1\t\t\tlocalhost\n");
- }
- if (dp)
+ if (dp) {
+ fprintf(fp, "::1\t\t\tlocalhost.%s localhost\n", dp);
fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp);
- else
+ } else {
+ fprintf(fp, "::1\t\t\tlocalhost\n");
fprintf(fp, "127.0.0.1\t\tlocalhost\n");
+ }
/* Now the host entries, if applicable */
if (((cp && cp[0] != '0') || (c6p && c6p[0] != '0')) && hp) {
char cp2[255];
OpenPOWER on IntegriCloud