} } } if ($_POST['apply']) { unset($input_errors); if (!is_subsystem_dirty('interfaces')) { $input_errors[] = gettext("You have already applied your settings!"); } else { unlink_if_exists("{$g['tmp_path']}/config.cache"); clear_subsystem_dirty('interfaces'); if (file_exists("{$g['tmp_path']}/.interfaces.apply")) { $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.interfaces.apply")); foreach ($toapplylist as $ifapply => $ifcfgo) { if (isset($config['interfaces'][$ifapply]['enable'])) { interface_bring_down($ifapply, false, $ifcfgo); interface_configure($ifapply, true); } else { interface_bring_down($ifapply, true, $ifcfgo); if (isset($config['dhcpd'][$ifapply]['enable']) || isset($config['dhcpdv6'][$ifapply]['enable'])) { services_dhcpd_configure(); } } } } /* restart snmp so that it binds to correct address */ services_snmpd_configure(); /* sync filter configuration */ setup_gateways_monitor(); clear_subsystem_dirty('interfaces'); filter_configure(); enable_rrd_graphing();
$bridge['autoptp'] = implode(',', $_POST['autoptp']); } $bridge['bridgeif'] = $_POST['bridgeif']; interface_bridge_configure($bridge); if ($bridge['bridgeif'] == "" || !stristr($bridge['bridgeif'], "bridge")) { $input_errors[] = gettext("Error occurred creating interface, please retry."); } else { if (isset($id) && $a_bridges[$id]) { $a_bridges[$id] = $bridge; } else { $a_bridges[] = $bridge; } write_config(); $confif = convert_real_interface_to_friendly_interface_name($bridge['bridgeif']); if ($confif != "") { interface_configure($confif); } header("Location: interfaces_bridge.php"); exit; } } } // port list with the exception of assigned bridge interfaces to prevent invalid configs function build_port_list($selecton) { global $config, $ifacelist; $portlist = array('list' => array(), 'selected' => array()); foreach ($ifacelist as $ifn => $ifdescr) { if (substr($config['interfaces'][$ifn]['if'], 0, 6) != "bridge") { $portlist['list'][$ifn] = $ifdescr; if (in_array($ifn, explode(',', $selecton))) {
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ require_once "guiconfig.inc"; require_once "filter.inc"; if ($_POST['if'] && $_POST['submit']) { $interface = $_POST['if']; if ($_POST['status'] == "up") { interface_bring_down($interface); } else { interface_configure($interface); } header("Location: status_interfaces.php"); exit; } $pgtitle = array(gettext("Status"), gettext("Interfaces")); $shortcut_section = "interfaces"; include "head.inc"; ?> <body> <?php include "fbegin.inc"; ?> <section class="page-content-main">
if (!is_array($config['interfaces'][$ifname]['wireless'])) { $config['interfaces'][$ifname]['wireless'] = array(); } } else { unset($config['interfaces'][$ifname]['wireless']); } /* make sure there is a descr for all interfaces */ if (!isset($config['interfaces'][$ifname]['descr'])) { $config['interfaces'][$ifname]['descr'] = strtoupper($ifname); } if ($reloadif == true) { if (preg_match($g['wireless_regex'], $ifport)) { interface_sync_wireless_clones($config['interfaces'][$ifname], false); } /* Reload all for the interface. */ interface_configure($ifname, true); } } } } write_config(); enable_rrd_graphing(); } } else { unset($delbtn); if (!empty($_POST['del'])) { $delbtn = key($_POST['del']); } if (isset($delbtn)) { $id = $delbtn; if (link_interface_to_group($id)) {