bugfix:cancel rebind6 timer after ipv6 expire
(cherry picked from commit 9a893a95bab101c995408e9cdc5d72b5276fdf5c)
This commit is contained in:
parent
6b80e70032
commit
a37541438a
54
bugfix-cancel-rebind6-timer-after-ipv6-expire.patch
Normal file
54
bugfix-cancel-rebind6-timer-after-ipv6-expire.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 6fced85ebcd9563ceb78675d0f4ff3e3d0eea90b Mon Sep 17 00:00:00 2001
|
||||
From: huyizhen <huyizhen2@huawei.com>
|
||||
Date: Thu, 24 Oct 2024 21:36:06 +0800
|
||||
Subject: huawei-cancel-rebind6-timer-after-ipv6-expire
|
||||
|
||||
Solve below question:
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: PRC: Address 6636::3c depreferred.
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: XMT: Rebind on enp4s0, interval 00ms.
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: Impossible condition at dhc6.c:279.
|
||||
Oct 23 16:38:04 localhost dhclient[141133]:
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: If you think you have received this message due to a bug rather
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: than a configuration issue please read the section on submitting
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: bugs on either our web page at www.isc.org or in the README file
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: before submitting a bug. These pages explain the proper
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: process and the information we find helpful for debugging.
|
||||
Oct 23 16:38:04 localhost dhclient[141133]:
|
||||
Oct 23 16:38:04 localhost dhclient[141133]: exiting.
|
||||
|
||||
The reason is:
|
||||
1. After the REBIND message is retransmitted for the second time, the REBIND timer checks whether the REBIND message
|
||||
is received 5 seconds later and sets the RT field to 0. (Because the 5s timer expires when the timer expires, no next
|
||||
retransmission will occur.)
|
||||
2. After 5s, the DEPREFER timer is triggered first. The DEPREFER timer considers that the REBIND timer expires and set
|
||||
MRD field to 0, but the previously set REBIND timer is not canceled.
|
||||
3. The REBIND timer is triggered immediately. Because the MRD is set to 0, the retransmission timer considers that the
|
||||
maximum retransmission duration is not limited and attempts to continue the retransmission.
|
||||
4. During the retransmission process, the RT value is 0 (retransmission is performed after 0s), and the process exits.
|
||||
As a result, the DHCP6 function becomes abnormal.
|
||||
|
||||
Solution:
|
||||
Cencle REBIND timer when DEPREFER timer considers that the REBIND timer expires.
|
||||
|
||||
---
|
||||
client/dhc6.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/client/dhc6.c b/client/dhc6.c
|
||||
index 88fd07d..2dbea60 100644
|
||||
--- a/client/dhc6.c
|
||||
+++ b/client/dhc6.c
|
||||
@@ -4656,6 +4656,10 @@ dhc6_check_times(struct client_state *client)
|
||||
* depreffed an address.
|
||||
*/
|
||||
client->MRD = hi_expire - cur_time;
|
||||
+ /* Rebind expired, cancel rebind(do_refresh6) timer. */
|
||||
+ if (client->MRD == 0) {
|
||||
+ cancel_timeout(do_refresh6, client);
|
||||
+ }
|
||||
break;
|
||||
|
||||
default:
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
Name: dhcp
|
||||
Version: 4.4.3
|
||||
Release: 7
|
||||
Release: 8
|
||||
Summary: Dynamic host configuration protocol software
|
||||
#Please don't change the epoch on this package
|
||||
Epoch: 12
|
||||
@ -62,6 +62,7 @@ Patch43: backport-CVE-2022-38177.patch
|
||||
Patch44: backport-CVE-2022-38178.patch
|
||||
Patch45: IAID-is-output-has-hexe-if-it-contains-or.patch
|
||||
Patch46: support-for-building-with-clang.patch
|
||||
Patch47: bugfix-cancel-rebind6-timer-after-ipv6-expire.patch
|
||||
|
||||
BuildRequires: gcc autoconf automake libtool openldap-devel krb5-devel libcap-ng-devel
|
||||
BuildRequires: systemd systemd-devel
|
||||
@ -310,6 +311,12 @@ exit 0
|
||||
%{_mandir}/man3/omapi.3.gz
|
||||
|
||||
%changelog
|
||||
* Wed Nov 5 huyizhen <huyizhen2@huawei.com> - 12:4.4.3-8
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC:cancel rebind6 timer after ipv6 expire
|
||||
|
||||
* Thu Mar 20 cf-zhao <zhaochuanfeng@huawei.com> - 12:4.4.3-7
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user