CC: | Jiri Popelka <jpopelka@redhat.com>, Pavel Simerda <psimerda@redhat.com> |
Subject: | server: cannot configure big lease_time on Fedora i686 |
Date: | Fri, 05 Sep 2014 13:27:30 +0200 |
To: | dhcp-bugs@isc.org |
From: | Fridolin Pokorny <fpokorny@redhat.com> |
Hi,
we have found that it is not possible to configure big lease time for
dhcp server on Fedora i686 [1].
This issue is caused by bad TIME type; dhcp uses time_t as TIME type
which is in fact signed integer. On Fedora i686 sizeof(time_t) == 4. As
the dhcp protocol uses 4 byte *unsigned* integers to define lease time,
there one can configure only half range of lease time. The other half
cannot be used due to non-zero check in server/dhcp.c:2110.
The best bugfix in my opinion is to use uint32_t. The dhcp protocol
specifies fixed range for lease time; thusly dhcp server/client should
be forced to use fixed range unsigned int.
Also note that this bug is not Fedora-specific. One can reproduce this
on every distribution/platform where sizeof(time_t) <= 4 and time_t is
signed.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1132396
--
Have a nice day!
Fridolin Pokorny