!10 sync:Avoid overflow in t2 computation
From: @zhangzhangxin Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
860e769f5f
26
0001-sync-dhcp-lease-Avoid-overflow-in-t2-computation.patch
Normal file
26
0001-sync-dhcp-lease-Avoid-overflow-in-t2-computation.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 8c53b21d7ba7b1b2b2a8108c76d6ee935fee1639 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangzhangxin <zhangxin1@xfusion.com>
|
||||||
|
Date: Fri, 12 May 2023 14:40:24 +0800
|
||||||
|
Subject: [PATCH] sync:dhcp-lease: Avoid overflow in t2 computation
|
||||||
|
|
||||||
|
Signed-off-by: zhangzhangxin <zhangxin1@xfusion.com>
|
||||||
|
---
|
||||||
|
ell/dhcp-lease.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/ell/dhcp-lease.c b/ell/dhcp-lease.c
|
||||||
|
index 4d49190..e93c618 100644
|
||||||
|
--- a/ell/dhcp-lease.c
|
||||||
|
+++ b/ell/dhcp-lease.c
|
||||||
|
@@ -151,7 +151,7 @@ struct l_dhcp_lease *_dhcp_lease_parse_options(struct dhcp_message_iter *iter)
|
||||||
|
lease->t1 = lease->lifetime / 2;
|
||||||
|
|
||||||
|
if (!lease->t2)
|
||||||
|
- lease->t2 = lease->lifetime * 7 / 8;
|
||||||
|
+ lease->t2 = lease->lifetime / 8 * 7;
|
||||||
|
|
||||||
|
if (lease->t1 > lease->t2)
|
||||||
|
goto error;
|
||||||
|
--
|
||||||
|
2.40.0.windows.1
|
||||||
|
|
||||||
@ -1,11 +1,12 @@
|
|||||||
Name: libell
|
Name: libell
|
||||||
Version: 0.32
|
Version: 0.32
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Embedded Linux library
|
Summary: Embedded Linux library
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://01.org/ell
|
URL: https://01.org/ell
|
||||||
Source0: https://www.kernel.org/pub/linux/libs/ell/ell-%{version}.tar.xz
|
Source0: https://www.kernel.org/pub/linux/libs/ell/ell-%{version}.tar.xz
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
Patch0: 0001-sync-dhcp-lease-Avoid-overflow-in-t2-computation.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Embedded Linux* Library (ELL) provides core, low-level functionality forsystem daemons. It typically
|
The Embedded Linux* Library (ELL) provides core, low-level functionality forsystem daemons. It typically
|
||||||
@ -41,6 +42,9 @@ Header files for developing %{name}.
|
|||||||
%{_libdir}/pkgconfig/ell.pc
|
%{_libdir}/pkgconfig/ell.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 12 2023 zhangxin <zhangxin1@xfusion.com> - 0.32-2
|
||||||
|
- dhcp-lease:Avoid overflow in t2 computation
|
||||||
|
|
||||||
* Tue Aug 18 2020 wangye <wangye70@huawei.com> - 0.32-1
|
* Tue Aug 18 2020 wangye <wangye70@huawei.com> - 0.32-1
|
||||||
- update to 0.32
|
- update to 0.32
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user