Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Feb 2016 20:21:54 +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: r296226 - head/etc
Message-ID:  <201602292021.u1TKLs4d078876@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Mon Feb 29 20:21:54 2016
New Revision: 296226
URL: https://svnweb.freebsd.org/changeset/base/296226

Log:
  network.subr: avoid unnecessary reinitialization
  
  Do not start interface when wpa_supplicant or hostapd is used;
  they will restart it anyway
  
  Tested with:
   * Intel 3945BG, STA mode (wpa_supplicant)
   * RTL8188EU, HOSTAP mode (hostapd)
  
  Approved by:	adrian (mentor)
  Differential Revision:	https://reviews.freebsd.org/D5486

Modified:
  head/etc/network.subr

Modified: head/etc/network.subr
==============================================================================
--- head/etc/network.subr	Mon Feb 29 19:41:40 2016	(r296225)
+++ head/etc/network.subr	Mon Feb 29 20:21:54 2016	(r296226)
@@ -214,16 +214,14 @@ ifconfig_up()
 	ifalias $1 link alias
 	ifalias $1 ether alias
 
-	if [ ${_cfg} -eq 0 ]; then
-		${IFCONFIG_CMD} $1 up
-	fi
-
 	if wpaif $1; then
 		/etc/rc.d/wpa_supplicant start $1
 		_cfg=0		# XXX: not sure this should count
 	elif hostapif $1; then
 		/etc/rc.d/hostapd start $1
 		_cfg=0
+	elif [ ${_cfg} -eq 0 ]; then
+		${IFCONFIG_CMD} $1 up
 	fi
 
 	if dhcpif $1; then



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