X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id EFB17DC006F for ; Wed, 30 Jul 2014 20:42:09 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id bj1so2194319pad.11 for ; Wed, 30 Jul 2014 13:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=2Xj1O4yJnJQJC41tvL9y4bSZesiUd5u9QHUUQB0YwvI=; b=YqUddg0QXkMBXPgkZubh3fp0JfBHlc5i5z6MCbH4YiurvniLxuR8hCi18XvH76VwKE o9Oat1v4AgXwIvGZvaqd2+boLBcpTFahJrfzuH4IG97nv+drgvZVoAjwHV0DH79e0Tdw +sgKLo4VzhPG9wH+KLcrEzjHx5DytUGnlCQyAOokATbV7JFkMiXO8+Kc31o1V+xwYwjD KV5vXrJJl0MeKlk9j9KC9AabMvpmVLYqGavVTCJp35Z32BJoGsOlYZvziP9hCWCJJNkR CjjdTs2aLU2LMkK5U+DnnbwlxGlGCAjc4Ug2zFH4dW5+QvzNcVVnuzjc9hdtcLa6cco5 YQ1g== X-Received: by 10.66.192.73 with SMTP id he9mr7640067pac.88.1406752928696; Wed, 30 Jul 2014 13:42:08 -0700 (PDT) Received: from newbook ([50.0.227.98]) by mx.google.com with ESMTPSA id pl10sm3249205pbb.56.2014.07.30.13.42.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jul 2014 13:42:07 -0700 (PDT) Date: Wed, 30 Jul 2014 13:42:03 -0700 From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] wpa_supplicant service and a replacement therof Message-ID: <20140730204202.GA1933@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Hello, I've run into a few problems with the alpine wpa_supplicant service, and so I ported a script I previously wrote to openrc. The script: github.com/idunham/wpanet Relevant files: README sbin/wpa_dhcp etc/init.d/wpanet etc/conf.d/wpanet The issues: 1. service wpa_supplicant does not specify a driver. For both devices I tested (modules ath5k and zd1211rw), this results in wpa_supplicant failing to associate. 2. if wpa_supplicant takes a long time to connect, service networking will take a long time to finish, before it gives up. 3. if wpa_supplicant completes connection after networking/ifup gives up, no IP will be obtained. Worse, you can't get one by running ifup again, since it's already marked as 'up'. With some drivers (madwifi) in the past, I have seen dhcp clients panic the kernel if they are started too soon. This isn't an issue with any drivers available in Alpine, as far as I know. For issue 1, it would be easy to port the driver autodetection code. Issues 2 and 3 are fundamental problems with the Alpine approach, due to the limitations of ifup -a. wpanet avoids them by removing all interfaces that wpa_supplicant controls from /etc/network/interfaces and using wpa_cli with an "action script". For those who need more than automatic dhcp, it is possible to configure /etc/wpa/interfaces in the same way you would configure /etc/network/interfaces; wpa_dhcp detects this and calls ifup -i /etc/wpa/interfaces if0 Migrating from one approach to the other would be scriptable, but not trivially so. I can think of two alternatives to that: (a) a very invasive change to the networking service that relies on the guts of wpa_supplicant, such that it does not call ifup on wireless interfaces but instead starts an 'action script' that will call ifup when it is ready. This "should work" but would be ugly and brittle. (b) make ifup not mark an interface as up when the dhcp client failed, and from either service start wpa_cli with an action script that calls ifup. I'm not eager to jump into any of the three options I mentioned. But if there's interest, I can port the driver autodetection over; additionally, I'd like to package wpanet. Thanks, Isaac Dunham --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---