代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dhcp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From dbb9d0302f7f5009a871844d6648ea131a3df6b4 Mon Sep 17 00:00:00 2001
From: renmingshuai <renmingshuai@huawei.com>
Date: Thu, 29 Jun 2023 10:04:49 +0800
Subject: [PATCH] revert the correction about the logic in dhclient
Reference:https://gitlab.isc.org/isc-projects/dhcp/-/commit/33e517615f8467a005de2ca2633f52bad323ec2b
https://gitlab.isc.org/isc-projects/dhcp/-/commit/e180ae075ecc989b6b75202d58363f96a8ce0167
---
RELNOTES | 4 ----
client/dhclient.c | 19 +++++--------------
2 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/RELNOTES b/RELNOTES
index 64d45b2..54ad022 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -51,10 +51,6 @@ by Eric Young (eay@cryptsoft.com).
- Minor corrections were made to allow compilation under gcc 10.
[GitLab #117]
-- The logic in dhclient that causes it to decline DHCPv4 leases if the
- client script exits abnormally (i.e. crashes) has been corrected.
- [GitLab #123]
-
- The limit on the size of a lease file that can be loaded at startup
is now only enforced on 32-bit systems.
[GitLab #92]
diff --git a/client/dhclient.c b/client/dhclient.c
index d20ba66..d39cb5c 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -2106,12 +2106,9 @@ void bind_lease (client)
script_write_params(client, "alias_", client->alias);
/* If the BOUND/RENEW code detects another machine using the
- offered address, then per our man page it should exit with
- a non-zero status, to which we send a DHCPDECLINE and toss
- the lease. A return value of less than zero indicates
- the script crashed (e.g. segfault) which script_go will log
- but we will ignore here. */
- if (script_go(client) > 0) {
+ offered address, it exits nonzero. We need to send a
+ DHCPDECLINE and toss the lease. */
+ if (script_go(client)) {
make_decline(client, client->new);
send_decline(client);
destroy_client_lease(client->new);
@@ -5184,14 +5181,8 @@ int script_go(struct client_state *client)
}
dfree (envp, MDL);
gettimeofday(&cur_tv, NULL);
-
- if (!WIFEXITED(wstatus)) {
- int sigval = WTERMSIG(wstatus);
- log_error ("script_go script: %s was terminated by signal %d", scriptName, sigval);
- return (-sigval);
- }
-
- return (WEXITSTATUS(wstatus));
+ return (WIFEXITED (wstatus) ?
+ WEXITSTATUS (wstatus) : -WTERMSIG (wstatus));
}
void client_envadd (struct client_state *client,
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。