diff --git a/0011-Drop-unnecessary-capabilities.patch b/0011-Drop-unnecessary-capabilities.patch index 4277bafb3146caba709d39afe1c51064048f7c8d..36ac7bf450d398f0352135e16fb5ed07b053a4b3 100644 --- a/0011-Drop-unnecessary-capabilities.patch +++ b/0011-Drop-unnecessary-capabilities.patch @@ -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@ \ diff --git a/adds-address-prefix-len-to-dhclient-cli.patch b/adds-address-prefix-len-to-dhclient-cli.patch deleted file mode 100644 index bd786cbea95cccc38c02181984a9318a73847174..0000000000000000000000000000000000000000 --- a/adds-address-prefix-len-to-dhclient-cli.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 3286e40ff01e78c172dfb0cdb684b58854af7604 Mon Sep 17 00:00:00 2001 -From: liuzhikang -Date: Thu, 31 Oct 2019 16:07:22 +0800 - -Signed-off-by: liuzhikang ---- - 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 ] [-p ]\n" - " [-D LL|LLT] [--dad-wait-time seconds]\n" -+ " [--address-prefix-len length]\n" - #else /* DHCP4o6 */ - "[-4|-6] [-SNTPRI1dvrxi] [-nw] [-p ]\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 ] [-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 - diff --git a/bugfix-dhcp-4.2.5-check-dhclient-pid.patch b/bugfix-dhcp-4.2.5-check-dhclient-pid.patch index d771445f1ff13ee629ea9c423005d993b84a17e7..127715921c995be41e0d4980d8a46664493bb100 100644 --- a/bugfix-dhcp-4.2.5-check-dhclient-pid.patch +++ b/bugfix-dhcp-4.2.5-check-dhclient-pid.patch @@ -9,15 +9,15 @@ 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; diff --git a/bugfix-reduce-getifaddr-calls.patch b/bugfix-reduce-getifaddr-calls.patch index 730390be195e334540a46c9c3aec6d424df88fd7..325d7941762c2f0b132070b12424920b8d782f7f 100644 --- a/bugfix-reduce-getifaddr-calls.patch +++ b/bugfix-reduce-getifaddr-calls.patch @@ -16,13 +16,12 @@ diff --git a/common/discover.c b/common/discover.c index afa33eb..4033feb 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 +30,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) diff --git a/dhcp-4.4.2b1.tar.gz b/dhcp-4.4.2.tar.gz similarity index 74% rename from dhcp-4.4.2b1.tar.gz rename to dhcp-4.4.2.tar.gz index bb6ef52f9f01d7c7e406392263b88157841fadf9..4c027d3fdb0767a8f91fa1e118da735488761317 100644 Binary files a/dhcp-4.4.2b1.tar.gz and b/dhcp-4.4.2.tar.gz differ diff --git a/dhcp-fix-dhclient-default-len-64-to-128.patch b/dhcp-fix-dhclient-default-len-64-to-128.patch deleted file mode 100644 index 1abbdf5703541f8a3ff7ad33a421fcb65b4ef18f..0000000000000000000000000000000000000000 --- a/dhcp-fix-dhclient-default-len-64-to-128.patch +++ /dev/null @@ -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 diff --git a/dhcp.spec b/dhcp.spec index b8398b5d64d7d311c3031ac06289883cfe609e9c..95763b0b7901400c3f504ade7a0bbf0253988f9c 100644 --- a/dhcp.spec +++ b/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,11 @@ 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 - -#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 +Patch6003: bugfix-dhcp-4.2.5-check-dhclient-pid.patch +Patch6004: bugfix-reduce-getifaddr-calls.patch +Patch9001: bugfix-dhcpd-2038-problem.patch +Patch9003: dhcpd-coredump-infiniband.patch +Patch9004: huawei-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 @@ -291,6 +288,12 @@ exit 0 %{_mandir}/man3/omapi.3.gz %changelog +* Fri May 29 2020 zhanglu - 4.4.2 +- Type:requirement +- ID:NA +- SUG:restart +- DESC: update to 4.4.2 + * Thu Apr 24 2020 zhanglu - 4.4.2b1 - Type:requirement - ID:NA