X-Scanned-BY: MIMEDefang 2.68 on 10.5.11.22 CC: Jiri Popelka , Pavel Simerda MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.0 Content-Type: text/plain; charset="UTF-8" Message-ID: <1409916450.9633.19.camel@brq.redhat.com> Organization: Red Hat Incl. Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) by bugs.isc.org (Postfix) with ESMTP id F3A782D20571 for ; Fri, 5 Sep 2014 11:27:35 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.redhat.com", Issuer "DigiCert SHA2 Extended Validation Server CA" (not verified)) by mx.pao1.isc.org (Postfix) with ESMTPS id D3BB2349457 for ; Fri, 5 Sep 2014 11:27:33 +0000 (UTC) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s85BRW44007959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 5 Sep 2014 07:27:32 -0400 Received: from [10.34.4.199] (unused-4-199.brq.redhat.com [10.34.4.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s85BRV5m023991; Fri, 5 Sep 2014 07:27:31 -0400 Delivered-To: dhcp-bugs@bugs.isc.org Subject: server: cannot configure big lease_time on Fedora i686 Return-Path: X-Original-To: dhcp-bugs@bugs.isc.org Date: Fri, 05 Sep 2014 13:27:30 +0200 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx.pao1.isc.org To: dhcp-bugs@isc.org Content-Transfer-Encoding: 7bit From: Fridolin Pokorny X-RT-Original-Encoding: utf-8 Content-Length: 884 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