diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-11-20 06:06:14 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-11-20 06:06:14 +0000 |
commit | e4b6977dd7935d32fe8d9fd83e25d82af3c8a011 (patch) | |
tree | d2e50fc658baabf6dc43a6795287aed329c0a4f1 /etc/inc/pfsense-utils.inc | |
parent | 16df91e0b14103b72948784e59a5d8e5d34f85cd (diff) | |
download | pfsense-e4b6977dd7935d32fe8d9fd83e25d82af3c8a011.zip pfsense-e4b6977dd7935d32fe8d9fd83e25d82af3c8a011.tar.gz |
When reloading_all() make sure we delete any old interfaces and recreate incase a user has reassigned the interfaces to new spots
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index d74bc29..dc2566c 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1205,9 +1205,8 @@ 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']; + /* delete all old interface information */ + $iflist = split(" ", str_replace("\n", "", `/sbin/ifconfig -l`)); foreach ($iflist as $ifent => $ifname) { $ifname_real = convert_friendly_interface_to_real_interface_name($ifname); mwexec("/sbin/ifconfig {$ifname_real} down"); @@ -1329,9 +1328,8 @@ 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']; + /* delete all old interface information */ + $iflist = split(" ", str_replace("\n", "", `/sbin/ifconfig -l`)); foreach ($iflist as $ifent => $ifname) { $ifname_real = convert_friendly_interface_to_real_interface_name($ifname); mwexec("/sbin/ifconfig {$ifname_real} down"); |