From owner-freebsd-bugs@FreeBSD.ORG Fri Nov 27 11:50:01 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC27106566B for ; Fri, 27 Nov 2009 11:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 40D458FC19 for ; Fri, 27 Nov 2009 11:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nARBo1R7014483 for ; Fri, 27 Nov 2009 11:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nARBo1Db014482; Fri, 27 Nov 2009 11:50:01 GMT (envelope-from gnats) Resent-Date: Fri, 27 Nov 2009 11:50:01 GMT Resent-Message-Id: <200911271150.nARBo1Db014482@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nicolas Fugier Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80A66106568B for ; Fri, 27 Nov 2009 11:44:18 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 6E64E8FC12 for ; Fri, 27 Nov 2009 11:44:18 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nARBiHg2007452 for ; Fri, 27 Nov 2009 11:44:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nARBiHAv007451; Fri, 27 Nov 2009 11:44:17 GMT (envelope-from nobody) Message-Id: <200911271144.nARBiHAv007451@www.freebsd.org> Date: Fri, 27 Nov 2009 11:44:17 GMT From: Nicolas Fugier To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/140935: FreeBSD patch makes dhclient not fully respect DHCP RFC 2131 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2009 11:50:01 -0000 >Number: 140935 >Category: misc >Synopsis: FreeBSD patch makes dhclient not fully respect DHCP RFC 2131 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 27 11:50:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Nicolas Fugier >Release: 5.3 >Organization: Sagem >Environment: FreeBSD desktop 5.3-RELEASE-p31 FreeBSD 5.3-RELEASE-p31 #5: Thu Jan 8 12:01:05 CET 2009 root@XXXXX:/usr/obj/usr/build/os/distrib/world/bsd/src/sys/MINIKERN-lru-dg i386 >Description: Hi, According to DHCP RFC 2131 (Figure 5 page 34 http://www.ietf.org/rfc/rfc2131.txt), the following actions should be done by DHCP client when entering in RENEWING state: - Send Unicast DHCPREQUEST to DHCP server - If DHCPACK is received, then enter BOUND state - If T2 expires and no DHCPACK is received, then enter the REBINDING state by sending a broadcast DHCPREQUEST [1] - If DHCPNACK is received then enter INIT state by Halting Network. The patch here: http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/isc-dhcp31-server/files/patch-client%3A%3Adhclient.c?rev=1.1;content-type=text%2Fplain introduces some modifications in this state machine, particularly in the [1] step: - If no packet is received within 10 seconds or if send function returned an error, then enter INIT state. We found this issue because we do not store the DHCP-given default gateway in the routing table, for security reasons, and it happens that our host is sometimes on a network with DHCP relay. In this case, as no route to DHCP server is available (DHCP server is on another IP network), the unicast DHCPREQUEST fails (due to inexistant route), and DHCP client state goes to INIT state, which halts network (losing some application added routes). I did not find any clue about the reasons of the mentionned modifications of the patch. I consider it as a bug as it breaks DHCP client state machine but I may be wrong. Best regards, >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: