integ/base/dhcp/centos/meta_patches/dhclient-dhcp6-set-hostname.patch
Zhixiong Chi cb85cff32b dhcp: fix CVE-2019-6470
Upgrade dhcp pkg to dhcp-4.2.5-82.el7.centos.src.rpm

Adjust the context of the patch to match to apply the new version.
At the same time as the new version depends on the bind-export
pacakges, so we also add the dependence package in tools repo.
 bind-export-libs-9.11.4-26.P2.el7.x86_64.rpm
 bind-export-devel-9.11.4-26.P2.el7.x86_64.rpm

In addition, since the patch dhcp-dhclient_ipv6_prefix.patch set the
default prefixlen to 128, which is usually the specifications call
for host address and it doesn't include any on-link information.
By contrast, 64 indicates that's subnet area, and this vaule is used
frequently as usual. So we still use the previous value 64.
As a result we don't need to modify the relevant place where every
application code needed for the compatibility any more.

Depends-On: https://review.opendev.org/c/starlingx/tools/+/772241

Story: 2008532
Task: 41638
Change-Id: I0305711790d8e3fb1adfa69e1077468456b65d84
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
2021-03-04 01:46:50 +00:00

39 lines
1.1 KiB
Diff

From 484178cab006e67cc132eec2587e59c5605edac7 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:25:05 -0400
Subject: WRS: dhclient-dhcp6-set-hostname.patch
---
SOURCES/dhclient-script | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/SOURCES/dhclient-script b/SOURCES/dhclient-script
index 87bad65..fb51eb5 100644
--- a/SOURCES/dhclient-script
+++ b/SOURCES/dhclient-script
@@ -653,6 +653,10 @@ dh6config() {
add_ipv6_addr_with_DAD
+
+ if [ -n "${new_fqdn_hostname}" ] && need_hostname; then
+ hostname ${new_fqdn_hostname} || echo "See -nc option in dhclient(8) man page."
+ fi
;;
RENEW6|REBIND6)
@@ -670,6 +674,10 @@ dh6config() {
[ ! "${new_dhcp6_domain_search}" = "${old_dhcp6_domain_search}" ]; then
make_resolv_conf
fi
+
+ if [ -n "${new_fqdn_hostname}" ] && need_hostname; then
+ hostname ${new_fqdn_hostname} || echo "See -nc option in dhclient(8) man page."
+ fi
;;
DEPREF6)
--
2.7.4