From owner-freebsd-current@FreeBSD.ORG Mon Aug 1 15:31:44 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07C7416A41F for ; Mon, 1 Aug 2005 15:31:44 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9000243D45 for ; Mon, 1 Aug 2005 15:31:43 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.91] ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j71FVgms002770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Aug 2005 08:31:43 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <42EE41A7.4020100@errno.com> Date: Mon, 01 Aug 2005 08:37:11 -0700 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050327) X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Snow References: <42EAD325.60707@errno.com> <20050801152156.GB90588@teardrop.org> In-Reply-To: <20050801152156.GB90588@teardrop.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: dhclient and wpa_supplicant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2005 15:31:44 -0000 James Snow wrote: > On Fri, Jul 29, 2005 at 06:08:53PM -0700, Sam Leffler wrote: > >>So the question is what are the outstanding issues with dhclient and >>wpa_supplicant? I'm mostly concerned with wireless devices but feel >>free to talk about wired interfaces too. > > > My biggest outstanding complaint is when booting with a wired network > and no present wireless network, if dhclient has any recorded leases for > the wireless interface, it will attempt to use the most recent one and > blows away the default gateway for the wired network. I then have to manually > 'netif stop ath0' and 'netif restart em0.' This sounds similar to Peter's desire for a priority to use in selecting which interface gets the default route. I've suggested to him this can be implemented in the dhclient-hooks script or similar. > > Not sure what the best solution is. Perhaps dhclient needs to be aware > of the associated/unassociated status of a wireless interface in the > same way that it's aware of the link status of a wired interface? It sounds like you want one dhclient process to be aware of what happens in another dhclient process. In handling global state like the default route and dns this is important but I'm trying to get it out of the dhclient program because it's a policy decision. Instead I want to see it somewhere that people can override if the default policy isn't right for them. > > >>If something doesn't work right please try to give steps to reproduce >>the problem. > > > In /etc/rc.conf: > > ifconfig_WIRED="DHCP" > ifconfig_WIRELESS="WPA DHCP" > > Boot once in the presence of a wireless network. Now reboot with a wired > network, but no present wireless network. dhclient will obtain a lease > for the wired interface, and when dhclient launches on the wireless > interface it will time out, use the recorded lease, and clobber the > wired default gateway. That seems wrong; we'll look into it. > > I don't know what happens when booting with both a wired and wireless > network; I've never tried. In the default case I think the wired network > should be preferred, but could there be a knob to change this? (Am I > failing to see just such a not in dhclient.conf somewhere?) This is the priority mechanism I mentioned above. I've see other dhclient-like programs that have various knobs to select which interface gets the default route but no scheme so far has seemed "right" to me. Sam