diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-11-06 23:46:58 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-11-06 23:46:58 +0000 |
commit | 86cb9ad14a7818abf17d03227cfd08428b0b208c (patch) | |
tree | 051ad22d5ab90bd88487b0c165730e6190dff662 /usr/local | |
parent | 6f9b8073dce54acd5c4058e3c57cd38343a5a30d (diff) | |
download | pfsense-86cb9ad14a7818abf17d03227cfd08428b0b208c.zip pfsense-86cb9ad14a7818abf17d03227cfd08428b0b208c.tar.gz |
Correct my copyright and fix span interface handling.
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/interfaces_bridge_edit.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr/local/www/interfaces_bridge_edit.php b/usr/local/www/interfaces_bridge_edit.php index 98d9dc1..3d9073a 100644 --- a/usr/local/www/interfaces_bridge_edit.php +++ b/usr/local/www/interfaces_bridge_edit.php @@ -2,9 +2,8 @@ /* $Id$ */ /* interfaces_bridge_edit.php - part of m0n0wall (http://m0n0.ch/wall) - Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. + Copyright (C) 2008 Ermal Luçi All rights reserved. Redistribution and use in source and binary forms, with or without @@ -128,10 +127,13 @@ if ($_POST) { $input_errors[] = "You must select at least 2 member interfaces for a bridge."; if (is_array($_POST['members'])) { - foreach($_POST['members'] as $ifmembers) + foreach($_POST['members'] as $ifmembers) { if (is_array($config['interfaces'][$ifmembers]['wireless']) && $config['interfaces'][$ifmembers]['wireless']['mode'] != "hostap") $input_errors[] = "Bridging a wireless interface is only possible in hostap mode."; + if ($_POST['span'] != "none" && $_POST['span'] == $ifmembers) + $input_errors[] = "Span interface cannot be part of the bridge. Remove the span interface from bridge members to continue."; + } } if (!$input_errors) { @@ -171,7 +173,10 @@ if ($_POST) { } $bridge['ifpriority'] = $ifpriority; $bridge['ifpathcost'] = $ifpathcost; - $bridge['span'] = $_POST['span']; + if ($_POST['span'] != "none") + $bridge['span'] = $_POST['span']; + else + unset($bridge['span']); if (isset($_POST['edge'])) $bridge['edge'] = implode(',', $_POST['edge']); if (isset($_POST['autoedge'])) @@ -410,6 +415,7 @@ Set the size of the bridge address cache to size. The default is <td valign="top" class="vncell">Span port</td> <td class="vtable"> <select name="span" class="formselect" id="span"> + <option value="none">none</option> <?php foreach ($ifacelist as $ifn => $ifdescr) { echo "<option value=\"{$ifn}\""; |