From owner-freebsd-arch@FreeBSD.ORG Tue Nov 5 19:03:49 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CD660652; Tue, 5 Nov 2013 19:03:49 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-x22e.google.com (mail-qe0-x22e.google.com [IPv6:2607:f8b0:400d:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C43B2EFB; Tue, 5 Nov 2013 19:03:49 +0000 (UTC) Received: by mail-qe0-f46.google.com with SMTP id s14so5318656qeb.33 for ; Tue, 05 Nov 2013 11:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=NRYgCyKCjrafZHaWFLMoH708tu1m5BkpkvpvMT8gQAY=; b=YqzfkOJmN+zOJPkhsFvwEzrekVZZzX+p/B+GkT2wZicTVSrZkSn3zIm5+6Cr+8hOdj d8XQXqmTeYO56okM1SQ1CJaIgeqRpkv/tIALGvZNeonDafC1C4iXp9xFxAXxuBReehGe /p4ujE14zVzNKC16/JSXRx5KQGIHez1zltivyE5g4HOL9FDyAa0p3QLU6uwkE+aTGhbx 6ed98xMvHwvjA+7DUOfWQknjg+LVa2v+5x8O2+0FG+0A63xWf5xJYQAyeGJu6dNmpM65 9n5IhQd52DrxNv0iZFaam/oX60iqmqGzpji0OV/MbQBprBhISkr/jZe5y0joQ1E+PdLX m1PA== MIME-Version: 1.0 X-Received: by 10.49.59.115 with SMTP id y19mr31529010qeq.8.1383678228585; Tue, 05 Nov 2013 11:03:48 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Tue, 5 Nov 2013 11:03:48 -0800 (PST) In-Reply-To: <201311051154.18872.jhb@freebsd.org> References: <1382572583.1862.39.camel@eva02.mbsd> <1383419596.3253.42.camel@eva02.mbsd> <201311051154.18872.jhb@freebsd.org> Date: Tue, 5 Nov 2013 11:03:48 -0800 X-Google-Sender-Auth: VQVObu6YbYwAdTlLt0xOukFlQ24 Message-ID: Subject: Re: service netif restart [iface] runs a wpa_supplicant twice From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: clutton , "freebsd-wireless@freebsd.org" , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:03:49 -0000 On 5 November 2013 08:54, John Baldwin wrote: > Note that devd just runs netif (via /etc/pccard_ether), so it's already > just one script, and having netif bail if devd is running would make > netif not do anything in the common case. > > What normally happens during boot is that '/etc/rc.d/netif start' creates > wlan0 and runs wpa_supplicant via 'childif_create' making a nested call to > ifn_start for wlan0. That is, childif_create autoruns /etc/rc.d/netif > explicitly after it creates the device. Probably that is what should be > removed. That would let devd always start wpa_supplicant via > /etc/pccard_ether. I've just tested this by doing a stop/start on iwn0 > (parent of wlan0, so wlan0 gets destroyed and re-created) and it started > wpa_supplicant correctly. > > Index: head/etc/network.subr > =================================================================== > --- network.subr (revision 257705) > +++ network.subr (working copy) > @@ -1429,9 +1429,6 @@ childif_create() > fi > ${IFCONFIG_CMD} $i name $child && cfg=0 > fi > - if autoif $child; then > - ifn_start $child > - fi > done > > # Create vlan interfaces > > I also tested vlans created via vlans_ and they should use the same fix as > well. Note that this model is more consistent with how cloned_interfaces > works where ifn_start is not explicitly run when each interface is created. > Instead, we rely on devd kicking off pccard_ether for those as well. Well, if you'd like to do the honours.. ? I'd like this fixed before 10.0-REL. It should make the normal use case for wifi actually work reliably again. -adrian