[dhclient -6] infinite preferred/valid lifetime represented as -1 (#1133839)
This commit is contained in:
parent
4992026c16
commit
3dc8f27fe3
37
dhcp-dhc6-life.patch
Normal file
37
dhcp-dhc6-life.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 4d5514f9579197a4200a52332a9047da1424b3ee Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Popelka <jpopelka@redhat.com>
|
||||
Date: Thu, 4 Sep 2014 16:03:38 +0200
|
||||
Subject: [PATCH] [dhclient -6] fix lease time exporting
|
||||
|
||||
addr->preferred_life and addr->max_life are u_int32_t
|
||||
so casting them to (int) causes problems with big values,
|
||||
for example with 'infinity' (0xffffffff), which is
|
||||
then represented as '-1' in dhclient-script.
|
||||
|
||||
Signed-off-by: Jiri Popelka <jpopelka@redhat.com>
|
||||
---
|
||||
client/dhc6.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/client/dhc6.c b/client/dhc6.c
|
||||
index c724b58..04a8fa0 100644
|
||||
--- a/client/dhc6.c
|
||||
+++ b/client/dhc6.c
|
||||
@@ -3862,10 +3862,10 @@ dhc6_marshall_values(const char *prefix, struct client_state *client,
|
||||
}
|
||||
client_envadd(client, prefix, "life_starts", "%d",
|
||||
(int)(addr->starts));
|
||||
- client_envadd(client, prefix, "preferred_life", "%d",
|
||||
- (int)(addr->preferred_life));
|
||||
- client_envadd(client, prefix, "max_life", "%d",
|
||||
- (int)(addr->max_life));
|
||||
+ client_envadd(client, prefix, "preferred_life", "%u",
|
||||
+ addr->preferred_life);
|
||||
+ client_envadd(client, prefix, "max_life", "%u",
|
||||
+ addr->max_life);
|
||||
}
|
||||
|
||||
/* ia fields. */
|
||||
--
|
||||
2.1.0
|
||||
|
10
dhcp.spec
10
dhcp.spec
@ -18,7 +18,7 @@
|
||||
Summary: Dynamic host configuration protocol software
|
||||
Name: dhcp
|
||||
Version: 4.3.1
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||
# that's why it is at 12 now. It should have never been used, but it was.
|
||||
@ -73,6 +73,7 @@ Patch33: dhcp-range6.patch
|
||||
Patch34: dhcp-no-subnet-error2info.patch
|
||||
Patch35: dhcp-ffff-checksum.patch
|
||||
Patch36: dhcp-sd_notify.patch
|
||||
Patch37: dhcp-dhc6-life.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -318,6 +319,10 @@ rm -rf includes/isc-dhcp
|
||||
# support for sending startup notification to systemd (#1077666)
|
||||
%patch36 -p1 -b .sd_notify
|
||||
|
||||
# [dhclient -6] infinite preferred/valid lifetime represented as -1 (#1133839)
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #37084])
|
||||
%patch37 -p1 -b .life
|
||||
|
||||
# Update paths in all man pages
|
||||
for page in client/dhclient.conf.5 client/dhclient.leases.5 \
|
||||
client/dhclient-script.8 client/dhclient.8 ; do
|
||||
@ -588,6 +593,9 @@ done
|
||||
%doc doc/html/
|
||||
|
||||
%changelog
|
||||
* Thu Sep 04 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.1-7
|
||||
- [dhclient -6] infinite preferred/valid lifetime represented as -1 (#1133839)
|
||||
|
||||
* Tue Aug 26 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.1-6
|
||||
- dhclient-script: another improvement of add_ipv6_addr_with_DAD()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user