summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravos <avos@FreeBSD.org>2016-02-29 20:21:54 +0000
committeravos <avos@FreeBSD.org>2016-02-29 20:21:54 +0000
commit6651465b382acb71573b4989e07ff5a42d575239 (patch)
tree80be20411ed4a6e149ade9af5f243351f92c0494
parentac01d0e42d905f1758cecc124bcf65024cb3a2d4 (diff)
downloadFreeBSD-src-6651465b382acb71573b4989e07ff5a42d575239.zip
FreeBSD-src-6651465b382acb71573b4989e07ff5a42d575239.tar.gz
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
-rw-r--r--etc/network.subr6
1 files changed, 2 insertions, 4 deletions
diff --git a/etc/network.subr b/etc/network.subr
index 0e5911b..2410e2d 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -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
OpenPOWER on IntegriCloud