summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-09-03 17:40:47 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-09-03 17:42:39 -0600
commit67e77adf47a66b9915feccc54d97c82cfa8922df (patch)
treeb1b05ebf8a1b48a239fbf5f79b639fa56eef19c4 /etc/inc/interfaces.inc
parentb2a6623150b1a455e87cbe22f25b3a777606ff61 (diff)
downloadpfsense-67e77adf47a66b9915feccc54d97c82cfa8922df.zip
pfsense-67e77adf47a66b9915feccc54d97c82cfa8922df.tar.gz
Protect against wpa_supplicant dying when bringing down interfaces to change wireless regulatory configuration.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 06fe6b0..2cdcea5 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2285,6 +2285,20 @@ EOD;
/* bring the clones back up that were previously up */
foreach ($clones_up as $clone_if) {
mwexec("{$ifconfig} " . escapeshellarg($clone_if) . " up");
+
+ /*
+ * Rerun the setup script for the interface if it isn't this interface, the interface
+ * is in infrastructure mode, and WPA is enabled.
+ * This can be removed if wpa_supplicant stops dying when you bring the interface down.
+ */
+ if ($clone_if != $if) {
+ $friendly_if = convert_real_interface_to_friendly_interface_name($clone_if);
+ if ( !empty($friendly_if)
+ && $config['interfaces'][$friendly_if]['wireless']['mode'] == "bss"
+ && isset($config['interfaces'][$friendly_if]['wireless']['wpa']['enable']) ) {
+ mwexec("/bin/sh {$g['tmp_path']}/{$clone_if}_setup.sh");
+ }
+ }
}
}
OpenPOWER on IntegriCloud