!10 update to 4.4.2
Merge pull request !10 from kircher/openEuler-20.03-LTS
This commit is contained in:
commit
8df0f0749d
@ -202,7 +202,7 @@ diff --git a/relay/Makefile.am b/relay/Makefile.am
|
||||
index 2ba5979..8900e0b 100644
|
||||
--- a/relay/Makefile.am
|
||||
+++ b/relay/Makefile.am
|
||||
@@ -6,7 +6,8 @@ dhcrelay_LDADD = ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
|
||||
@@ -8,6 +8,7 @@ dhcrelay_LDADD = ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
|
||||
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
From 3286e40ff01e78c172dfb0cdb684b58854af7604 Mon Sep 17 00:00:00 2001
|
||||
From: liuzhikang <liuzhikang3@huawei.com>
|
||||
Date: Thu, 31 Oct 2019 16:07:22 +0800
|
||||
|
||||
Signed-off-by: liuzhikang <liuzhikang3@huawei.com>
|
||||
---
|
||||
client/dhc6.c | 3 ++-
|
||||
client/dhclient.c | 17 +++++++++++++++--
|
||||
2 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/client/dhc6.c b/client/dhc6.c
|
||||
index 5460ee1..fe0057c 100644
|
||||
--- a/client/dhc6.c
|
||||
+++ b/client/dhc6.c
|
||||
@@ -148,6 +148,7 @@ static int dhc6_score_lease(struct client_state *client,
|
||||
|
||||
extern int onetry;
|
||||
extern int stateless;
|
||||
+extern int address_prefix_len;
|
||||
|
||||
/*
|
||||
* Assign DHCPv6 port numbers as a client.
|
||||
@@ -4364,7 +4365,7 @@ dhc6_marshall_values(const char *prefix, struct client_state *client,
|
||||
(unsigned) addr->plen);
|
||||
} else {
|
||||
client_envadd(client, prefix, "ip6_prefixlen",
|
||||
- "%d", DHCLIENT_DEFAULT_PREFIX_LEN);
|
||||
+ "%d", address_prefix_len);
|
||||
client_envadd(client, prefix, "ip6_address",
|
||||
"%s", piaddr(addr->address));
|
||||
}
|
||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||
index 62b90cf..9f8ba06 100644
|
||||
--- a/client/dhclient.c
|
||||
+++ b/client/dhclient.c
|
||||
@@ -108,6 +108,7 @@ int require_all_ias = 0; /* If the user requires all of the IAs to
|
||||
be available before accepting a lease
|
||||
0 = no, 1 = requries */
|
||||
int dad_wait_time = 0;
|
||||
+int address_prefix_len = DHCLIENT_DEFAULT_PREFIX_LEN;
|
||||
char *mockup_relay = NULL;
|
||||
|
||||
char *progname = NULL;
|
||||
@@ -190,9 +191,11 @@ usage(const char *sfmt, const char *sarg)
|
||||
#ifdef DHCP4o6
|
||||
"[-4|-6] [-SNTPRI1dvrxi] [-nw] -4o6 <port>] [-p <port>]\n"
|
||||
" [-D LL|LLT] [--dad-wait-time seconds]\n"
|
||||
+ " [--address-prefix-len length]\n"
|
||||
#else /* DHCP4o6 */
|
||||
"[-4|-6] [-SNTPRI1dvrxi] [-nw] [-p <port>]\n"
|
||||
- " [-D LL|LLT] [--dad-wait-time seconds]\n"
|
||||
+ " [-D LL|LLT] [--dad-wait-time seconds]\n"
|
||||
+ " [--address-prefix-len length]\n"
|
||||
#endif
|
||||
#else /* DHCPv6 */
|
||||
"[-I1dvrxi] [-nw] [-p <port>] [-D LL|LLT] \n"
|
||||
@@ -452,7 +455,17 @@ main(int argc, char **argv) {
|
||||
if (errno || (*s != '\0') || (dad_wait_time < 0)) {
|
||||
usage("Invalid value for --dad-wait-time: %s", argv[i]);
|
||||
}
|
||||
-
|
||||
+ } else if (!strcmp(argv[i], "--address-prefix-len")) {
|
||||
+ if (++i == argc) {
|
||||
+ usage(use_noarg, argv[i-1]);
|
||||
+ }
|
||||
+ errno = 0;
|
||||
+ address_prefix_len = (int)strtol(argv[i], &s, 10);
|
||||
+ if (errno || (*s != '\0') ||
|
||||
+ (address_prefix_len < 0)) {
|
||||
+ usage("Invalid value for"
|
||||
+ " --address-prefix-len: %s", argv[i]);
|
||||
+ }
|
||||
#endif /* DHCPv6 */
|
||||
} else if (!strcmp(argv[i], "-D")) {
|
||||
duid_v4 = 1;
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@ -9,15 +9,14 @@
|
||||
extern struct option *default_requested_options[];
|
||||
|
||||
void run_stateless(int exit_mode, u_int16_t port);
|
||||
@@ -129,6 +131,8 @@
|
||||
static void dhclient_ddns_cb_free(dhcp_ddns_cb_t *ddns_cb,
|
||||
@@ -143,6 +143,7 @@ static void dhclient_ddns_cb_free(dhcp_ddns_cb_t *ddns_cb,
|
||||
char* file, int line);
|
||||
#endif /* defined NSUPDATE */
|
||||
|
||||
+static int check_dhclient_pid(pid_t pid);
|
||||
+
|
||||
|
||||
/*!
|
||||
*
|
||||
* \brief Print the generic usage message
|
||||
@@ -682,7 +686,8 @@
|
||||
e = fscanf(pidfd, "%ld\n", &temp);
|
||||
oldpid = (pid_t)temp;
|
||||
|
||||
@ -13,16 +13,14 @@ Signed-off-by: LuZhang<zhanglu37@huawei.com>
|
||||
3 files changed, 122 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/common/discover.c b/common/discover.c
|
||||
index afa33eb..4033feb 100644
|
||||
index 6860645..26be5de 100644
|
||||
--- a/common/discover.c
|
||||
+++ b/common/discover.c
|
||||
@@ -573,11 +573,14 @@ discover_interfaces(int state) {
|
||||
int ir;
|
||||
isc_result_t status;
|
||||
int wifcount = 0;
|
||||
+ struct ifaddrs *ifaddrs_start = NULL;
|
||||
@@ -588,9 +588,12 @@ discover_interfaces(int state) {
|
||||
#endif
|
||||
|
||||
static int setup_fallback = 0;
|
||||
+ struct ifaddrs *ifaddrs_start = NULL;
|
||||
|
||||
if (!begin_iface_scan(&ifaces)) {
|
||||
log_fatal("Can't get list of interfaces.");
|
||||
@ -31,7 +29,7 @@ index afa33eb..4033feb 100644
|
||||
}
|
||||
|
||||
/* If we already have a list of interfaces, and we're running as
|
||||
@@ -636,7 +639,7 @@ discover_interfaces(int state) {
|
||||
@@ -651,7 +654,7 @@ discover_interfaces(int state) {
|
||||
tmp = interfaces; /* XXX */
|
||||
}
|
||||
if (tmp != NULL)
|
||||
@ -40,7 +38,6 @@ index afa33eb..4033feb 100644
|
||||
|
||||
if (dhcp_interface_discovery_hook) {
|
||||
(*dhcp_interface_discovery_hook)(tmp);
|
||||
diff --git a/common/lpf.c b/common/lpf.c
|
||||
index 9ec8a31..823ba6b 100644
|
||||
--- a/common/lpf.c
|
||||
+++ b/common/lpf.c
|
||||
|
||||
Binary file not shown.
@ -1,11 +0,0 @@
|
||||
--- dhcp-4.3.6/includes/site.h.bak 2019-09-03 09:41:12.816000000 -0400
|
||||
+++ dhcp-4.3.6/includes/site.h 2019-09-03 09:55:03.308000000 -0400
|
||||
@@ -286,7 +286,7 @@
|
||||
is a host address and doesn't include any on-link information.
|
||||
64 indicates that the first 64 bits are the subnet or on-link
|
||||
prefix. */
|
||||
-#define DHCLIENT_DEFAULT_PREFIX_LEN 64
|
||||
+#define DHCLIENT_DEFAULT_PREFIX_LEN 128
|
||||
|
||||
/* Enable the gentle shutdown signal handling. Currently this
|
||||
means that on SIGINT or SIGTERM a client will release its
|
||||
21
dhcp.spec
21
dhcp.spec
@ -2,7 +2,7 @@
|
||||
%global dhcpconfdir %{_sysconfdir}/dhcp
|
||||
|
||||
Name: dhcp
|
||||
Version: 4.4.2b1
|
||||
Version: 4.4.2
|
||||
Release: 0
|
||||
Summary: Dynamic host configuration protocol software
|
||||
#Please don't change the epoch on this package
|
||||
@ -46,14 +46,12 @@ Patch25 : 0025-bind-Detect-system-time-changes.patch
|
||||
Patch26: 0026-Add-dhclient-5-B-option-description.patch
|
||||
Patch27: 0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch
|
||||
|
||||
#Patch6003: bugfix-dhcp-4.2.5-check-dhclient-pid.patch
|
||||
#Patch6004: bugfix-reduce-getifaddr-calls.patch
|
||||
Patch6003: bugfix-dhcp-4.2.5-check-dhclient-pid.patch
|
||||
Patch6004: bugfix-reduce-getifaddr-calls.patch
|
||||
|
||||
#Patch9000: dhcp-fix-dhclient-default-len-64-to-128.patch
|
||||
#Patch9001: bugfix-dhcpd-2038-problem.patch
|
||||
#Patch9002: adds-address-prefix-len-to-dhclient-cli.patch
|
||||
#Patch9003: dhcpd-coredump-infiniband.patch
|
||||
#Patch9004: bugfix-dhclient-check-if-pid-was-held.patch
|
||||
Patch9001: bugfix-dhcpd-2038-problem.patch
|
||||
Patch9003: dhcpd-coredump-infiniband.patch
|
||||
Patch9004: bugfix-dhclient-check-if-pid-was-held.patch
|
||||
|
||||
BuildRequires: gcc autoconf automake libtool openldap-devel krb5-devel libcap-ng-devel bind-export-devel
|
||||
BuildRequires: systemd systemd-devel
|
||||
@ -245,6 +243,7 @@ exit 0
|
||||
%dir %{_sysconfdir}/openldap/schema
|
||||
%config(noreplace) %{_sysconfdir}/openldap/schema/dhcp.schema
|
||||
%attr(0750,root,root) %dir %{dhcpconfdir}
|
||||
%dir %{_localstatedir}/lib/dhclient
|
||||
%dir %{dhcpconfdir}/dhclient.d
|
||||
%dir %{_sysconfdir}/NetworkManager
|
||||
%dir %{_sysconfdir}/NetworkManager/dispatcher.d
|
||||
@ -291,6 +290,12 @@ exit 0
|
||||
%{_mandir}/man3/omapi.3.gz
|
||||
|
||||
%changelog
|
||||
* Wed May 6 2020 zhanglu<zhanglu37@huawei.com> - 4.4.2b1-1
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC: add lease file directoroy
|
||||
|
||||
* Thu Apr 24 2020 zhanglu<zhanglu37@huawei.com> - 4.4.2b1
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user