Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2019 04:50:56 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343249 - head/sbin/devd
Message-ID:  <201901210450.x0L4ouKV079336@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Mon Jan 21 04:50:56 2019
New Revision: 343249
URL: https://svnweb.freebsd.org/changeset/base/343249

Log:
  Fix duplicate wpa_supplicant(8) / hostapd(8) startup with devd(8)
  
  Do not invoke 'wlan_up' function from devd(8) on interface
  creation event (an example to create such event:
  'ifconfig wlan0 create wlandev rtwn0');
  they're typically produced during 'service netif (re)start'
  and result in duplicate interface initialization.
  
  From the user side if WPA option is used, this result in messages like:
  - /etc/rc.d/wpa_supplicant: WARNING: failed to start wpa_supplicant
  or
  - wpa_supplicant already running?  (pid=xxxx).
  (for HOSTAP interfaces this race may result in startup failure).
  
  As a side effect, wpa_supplicant(8) / hostapd(8) will not be
  invoked when new wlan(4) interface is created manually and
  corresponding configuration for it is present in rc.conf(5).
  
  This change does not affect device attach / removal events.
  
  MFC after:	5 days

Modified:
  head/sbin/devd/devd.conf

Modified: head/sbin/devd/devd.conf
==============================================================================
--- head/sbin/devd/devd.conf	Mon Jan 21 04:10:45 2019	(r343248)
+++ head/sbin/devd/devd.conf	Mon Jan 21 04:50:56 2019	(r343249)
@@ -43,7 +43,7 @@ options {
 #
 notify 0 {
 	match "system"		"IFNET";
-	match "subsystem"	"!usbus[0-9]+";
+	match "subsystem"	"(?!usbus[0-9]+|?!wlan[0-9]+)";
 	match "type"		"ATTACH";
 	action "/etc/pccard_ether $subsystem start";
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901210450.x0L4ouKV079336>