summaryrefslogtreecommitdiffstats
path: root/source/n/network-scripts/0002-add-hostname-loopback-entries-in-etc-hosts-for-dhcp.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2022-01-02 20:40:21 +0000
committer Eric Hameleers <alien@slackware.com>2022-01-03 08:59:54 +0100
commit776cc36f81c77479609546ff8ed87b56ec71a279 (patch)
tree762ccb3a3f8fedef53ab339908a399fc5318f1d6 /source/n/network-scripts/0002-add-hostname-loopback-entries-in-etc-hosts-for-dhcp.patch
parent4b5d75483c1f858242945982c4bf879f9a7929ac (diff)
downloadcurrent-b93bc8a8ceb8f38ac0d66ad63b1271477dd5af37.tar.gz
current-b93bc8a8ceb8f38ac0d66ad63b1271477dd5af37.tar.xz
Sun Jan 2 20:40:21 UTC 202220220102204021
d/doxygen-1.9.3-x86_64-1.txz: Upgraded. n/network-scripts-15.0-noarch-18.txz: Rebuilt. netconfig: when DHCP configuration is selected, also add hostname labeled loopback entries to /etc/hosts. We don't want to have to rely on something else providing correct name service in order to be able to reach our machine through its own hostname. This was a regression since the netconfig shipped with Slackware 14.2. Thanks to Zexuo.
Diffstat (limited to 'source/n/network-scripts/0002-add-hostname-loopback-entries-in-etc-hosts-for-dhcp.patch')
-rw-r--r--source/n/network-scripts/0002-add-hostname-loopback-entries-in-etc-hosts-for-dhcp.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/n/network-scripts/0002-add-hostname-loopback-entries-in-etc-hosts-for-dhcp.patch b/source/n/network-scripts/0002-add-hostname-loopback-entries-in-etc-hosts-for-dhcp.patch
new file mode 100644
index 000000000..08cc1807f
--- /dev/null
+++ b/source/n/network-scripts/0002-add-hostname-loopback-entries-in-etc-hosts-for-dhcp.patch
@@ -0,0 +1,25 @@
+From aab9ad500096d67919f7e4f12a7466a74770d3a5 Mon Sep 17 00:00:00 2001
+From: Patrick J. Volkerding <volkerdi@slackware.com>
+Date: Sun, 2 Jan 2022 14:17:08 -0600
+Subject: [PATCH] Add hostname-labeled loopback entries for DHCP
+
+This addresses a regression since the netconfig in Slackware 14.2. Previously,
+when selecting to configure the machine with DHCP we would have entries with
+the loopback addresses that were labeled with the machine's hostname.
+Without these, a machine will not be able to contact itself using its own
+hostname unless something else is providing matching name service, and we
+do not want to have to rely on this.
+
+--- ./sbin/netconfig.orig 2022-01-02 14:07:01.168594490 -0600
++++ ./sbin/netconfig 2022-01-02 14:14:30.835569617 -0600
+@@ -554,6 +554,10 @@
+ rm -f $TMP/reply
+
+ if [ "$REPLY" = "DHCP" ]; then
++ # We need the line below to make sure there are entries for loopback in
++ # /etc/hosts labeled with the machine's hostname, otherwise we might not
++ # be able to reach our own machine using the hostname.
++ LOOPBACK="yes"
+ dialog --title "SELECT DHCP TYPE" --default-item "DHCPv4" \
+ --cancel-button "Exit" --menu \
+ "Please select the type of DHCP to use to configure your networking.