From owner-freebsd-arch@FreeBSD.ORG Sun Nov 3 17:56:09 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 BBD6B65D; Sun, 3 Nov 2013 17:56:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x233.google.com (mail-qc0-x233.google.com [IPv6:2607:f8b0:400d:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65C8A2A35; Sun, 3 Nov 2013 17:56:09 +0000 (UTC) Received: by mail-qc0-f179.google.com with SMTP id k18so3509871qcv.38 for ; Sun, 03 Nov 2013 09:56:08 -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=NlrG4wNrL09iDomEUipaW/rTe8So5H02pro7JNWh9Ok=; b=TYA2Uv6WBUrCYvIbB5X6Uwca3I+ee9qCvpMYWXb4A3MYpYppWq8pP0MPmGyEaaAFiC Z9QWKQ/uCVCwMcC02Xfrdzx4CfTJmBLgWUb6jgV+2/cYhaLk1vZdMh3LRt7hnPJaeklW fFZ+ZeqxP+KmG9I7hpomilMqMO4eFFdLCFHClg5iXJVujl4EcHv8yp7F2oVFutA00J2m EMDK6opUS8eL5vcL+okgSDghGZ38k6Rm0+CcY7POASDcazURunFj8DP/q/nAcUx8FYwx lmGnM72eru8BYcHJXrbAaLY6wkXimN1t0nDLbDUQj723/OP6iLq2hBxt91n6HvhDaUyn s1vQ== MIME-Version: 1.0 X-Received: by 10.224.51.131 with SMTP id d3mr17707474qag.0.1383501368569; Sun, 03 Nov 2013 09:56:08 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Sun, 3 Nov 2013 09:56:08 -0800 (PST) In-Reply-To: <1383419596.3253.42.camel@eva02.mbsd> References: <1382572583.1862.39.camel@eva02.mbsd> <1382589020.1846.36.camel@eva02.mbsd> <1383331203.12614.1.camel@eva02.mbsd> <1383336004.13657.18.camel@eva02.mbsd> <1383338117.13657.53.camel@eva02.mbsd> <1383382815.31973.1.camel@eva02.mbsd> <1383419596.3253.42.camel@eva02.mbsd> Date: Sun, 3 Nov 2013 09:56:08 -0800 X-Google-Sender-Auth: 6LW7WgQ8fQeIU01Y_JcFzla5h3M Message-ID: Subject: Re: service netif restart [iface] runs a wpa_supplicant twice From: Adrian Chadd To: clutton , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-wireless@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: Sun, 03 Nov 2013 17:56:09 -0000 On 2 November 2013 12:13, clutton wrote: [snip] > What was happened? netif tries to setup wlan0 (clone, wpa, dhcp, etc), > when wlan0 interface occurs, devd runs another copy of netif. Well, it sounds like we need to pick an architecture _and_ fix the behaviour here. Which is: * I think wpa-supplicant should always run if it's required in /etc/rc.conf; * netif should check if devd is configured and if so, just leave the configuration up to devd * if it isn't running, then devd should be responsible for dhclient/add-to-wpa-config What we first have to establish is whether add_interface and remove_interface (or whatever they're called) are correctly working, for ethernet and wifi driver types. Then, we need to ensure they can coexist (ie, one wpa_supplicant, but with both ethernet/wifi drivers loaded and active on their relevant interfaces.) _then_ we can break out the "stuff devd does" out of netif and have _either_ netif (x)or devd call this new script to setup/teardown the interface runtime state. How's that sound? -adrian