MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI, SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-TM-As-Product-Ver: SMEX-10.2.0.1135-6.800.1017-19732.003 X-TM-As-User-Approved-Sender: Yes Content-Language: fr-FR Message-ID: <01EDEEAE5DA8584CAAD628AA5B06179A1F06A2FD@EXDAG0-A3.intra.cea.fr> Content-Type: text/plain; charset="utf-8" X-MS-Tnef-Correlator: X-RT-Original-Encoding: utf-8 Received: from mx.ams1.isc.org (mx.ams1.isc.org [199.6.1.65]) by bugs.isc.org (Postfix) with ESMTP id DEBD72D20571 for ; Wed, 20 Mar 2013 12:37:25 +0000 (UTC) Received: from oxalide-out.extra.cea.fr (oxalide-out.extra.cea.fr [132.168.224.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "oxalide.extra.cea.fr", Issuer "CEA AC Technique 2007" (not verified)) by mx.ams1.isc.org (Postfix) with ESMTPS id 9A1785F98FC for ; Wed, 20 Mar 2013 12:37:14 +0000 (UTC) (envelope-from olivier.lahaye@cea.fr) Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by oxalide.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.3) with ESMTP id r2KCbCnE018469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 20 Mar 2013 13:37:12 +0100 Received: from muguet1.intra.cea.fr (muguet1.intra.cea.fr [132.166.192.6]) by pisaure.intra.cea.fr (8.14.4/8.14.4) with ESMTP id r2KCbCa8022776 for ; Wed, 20 Mar 2013 13:37:12 +0100 (envelope-from olivier.lahaye@cea.fr) Received: from EXCAH-A3.intra.cea.fr (excah-a3.intra.cea.fr [132.166.88.77]) by muguet1.intra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.2) with ESMTP id r2KCbCw6018924 for ; Wed, 20 Mar 2013 13:37:12 +0100 Received: from EXDAG0-A3.intra.cea.fr ([fe80::25a1:c396:2106:4c5b]) by EXCAH-A3.intra.cea.fr ([fe80::60de:a77e:427d:f7e6%11]) with mapi id 14.02.0318.004; Wed, 20 Mar 2013 13:36:31 +0100 X-TM-As-User-Blocked-Sender: No Delivered-To: dhcp-bugs@bugs.isc.org Subject: RE : [ISC-Bugs #32935] Bug found and tracked down in dhclient 4.2.4 and 4.2.5 at least (not present in 2.0pl5) X-TM-As-Result: No--44.599700-0.000000-31 Return-Path: Thread-Index: AQHOJWeMSIgr3NmTgUSGPV8rdhaDYg== X-Original-To: dhcp-bugs@bugs.isc.org Date: Wed, 20 Mar 2013 12:37:11 +0000 X-MS-Has-Attach: Thread-Topic: RE : [ISC-Bugs #32935] Bug found and tracked down in dhclient 4.2.4 and 4.2.5 at least (not present in 2.0pl5) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mx.ams1.isc.org X-Originating-Ip: [132.166.88.110] Accept-Language: fr-FR, en-US To: "dhcp-bugs@isc.org" Content-Transfer-Encoding: quoted-printable From: LAHAYE Olivier RT-Message-ID: Content-Length: 3143 Hi, After testing some releases, it appears the V3.1.3 is the last version that works. Since V4 (even if ipv6 is disblaed), dhclient is unable to initialise nics that have unititialized and down (flag 0x1002) if not specified on command line. This bug only affect the discover_interfaces(DISCOVER_UNCONFIGURED) which is almost never used on modern distros as the dhclient is often calld by systemd or udev rules with the specific nic to configure on the command line. -- Olivier LAHAYE CEA DRT/LIST/DCSI/DIR ________________________________________ De : DHCP Bugs via RT [dhcp-bugs@isc.org] Date d'envoi : mercredi 20 mars 2013 10:09 À : LAHAYE Olivier Objet : [ISC-Bugs #32935] AutoReply: Bug found and tracked down in dhclient 4.2.4 and 4.2.5 at least (not present in 2.0pl5) Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: "Bug found and tracked down in dhclient 4.2.4 and 4.2.5 at least (not present in 2.0pl5)", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [ISC-Bugs #32935]. Please include the string: [ISC-Bugs #32935] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, dhcp-bugs@isc.org ------------------------------------------------------------------------- Dear all, I've just found and identified a bug in dhclient while trying to create my own initrd for the systemimager project. When starting dhclient without argument, dhclient ignores the eth0 network card and fails with error "No broadcast interfaces found - exiting". It's because eth0 at this moment has flag 0x1002. It is down but it is a BROADCAST interface. If I strart "dhclient eth0", it correctly get an IP address for eth0. If I reset the eth0 iface to its previous state (down + IP=0.0.0.0), and If I assign a non null IP address (a random non null address), dhclient without specifying the interface on the command line will succeed. So this is clearly a bug when calling discover_interfaces(DISCOVER_UNCONFIGURED), as it works when are in the discover_interfaces(DISCOVER_RUNNING) case. The problem is in file dhcp-4.2.4-P2/common/discover.c:576 (same for 4.2.5) If the ioctl trying to get the IP address of the network card fails (needed to check if there is already a lease maybe?), then it is skipped (continue statement). The code does not check flags to see that the interface is down (thus uncondfigured). Another problem is that at this point, we do not have the flags. I've tested to move the flags retreival code before the get address section, and replace the continue with a return. This partially work. The interface is not ignored anymore, unfortunately, later on, line 1003, when testing info.addr.ss_family, the value is uninitialized, and the interface is not configured..... I'm unfortunately not enough skilled to fix this, so if one can fix this, that would be cool. Best regards, -- Olivier LAHAYE CEA DRT/LIST/DCSI/DIR