summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-20 04:44:07 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-20 04:44:07 +0000
commita54890818d5d01e2bc0bdbc7b9db7ceb9e8a4b78 (patch)
tree8f68e788f918f36f6522e39805db173191a32d45 /etc/inc
parent0480df8202391e235e9da23735de502f9d83e036 (diff)
downloadpfsense-a54890818d5d01e2bc0bdbc7b9db7ceb9e8a4b78.zip
pfsense-a54890818d5d01e2bc0bdbc7b9db7ceb9e8a4b78.tar.gz
Down all interfaces before reloading settings. Otherwise PF gets wacked out.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc18
1 files changed, 17 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index a035c51..b1f4c85 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1204,7 +1204,15 @@ function reload_interfaces_sync() {
/* parse config.xml again */
$config = parse_config(true);
-
+
+ $iflist = array("lan" => "LAN");
+ for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++)
+ $iflist['opt' . $i] = $config['interfaces']['opt' . $i]['descr'];
+ foreach ($iflist as $ifent => $ifname) {
+ $ifname_real = convert_friendly_interface_to_real_interface_name($ifname);
+ mwexec("/sbin/ifconfig {$ifname_real} down");
+ }
+
/* set up LAN interface */
interfaces_lan_configure();
@@ -1320,6 +1328,14 @@ function reload_all_sync() {
/* generate resolv.conf */
system_resolvconf_generate();
+ $iflist = array("lan" => "LAN");
+ for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++)
+ $iflist['opt' . $i] = $config['interfaces']['opt' . $i]['descr'];
+ foreach ($iflist as $ifent => $ifname) {
+ $ifname_real = convert_friendly_interface_to_real_interface_name($ifname);
+ mwexec("/sbin/ifconfig {$ifname_real} down");
+ }
+
/* set up LAN interface */
interfaces_lan_configure();
OpenPOWER on IntegriCloud