summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-08-31 14:44:02 +0000
committerErmal Luçi <eri@pfsense.org>2008-08-31 14:44:02 +0000
commit74d65827db40936f016b5efb71b0a55a75488196 (patch)
tree1214eaf882b867de0fc5e659202c59a14632f828 /usr/local
parent9a1c227e875dbd91e45081ae526bd124c8e109aa (diff)
downloadpfsense-74d65827db40936f016b5efb71b0a55a75488196.zip
pfsense-74d65827db40936f016b5efb71b0a55a75488196.tar.gz
Fix detection if an interface is part of bridge.
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/diag_packet_capture.php2
-rwxr-xr-xusr/local/www/diag_ping.php2
-rwxr-xr-xusr/local/www/services_captiveportal.php10
-rwxr-xr-xusr/local/www/services_dhcp.php2
-rwxr-xr-xusr/local/www/services_wol.php2
-rwxr-xr-xusr/local/www/services_wol_edit.php2
-rw-r--r--usr/local/www/widgets/widgets/services_status.widget.php2
7 files changed, 8 insertions, 14 deletions
diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php
index 28e77f5..4ff4ed9 100644
--- a/usr/local/www/diag_packet_capture.php
+++ b/usr/local/www/diag_packet_capture.php
@@ -132,7 +132,7 @@ include("head.inc"); ?>
<select name="interface">
<?php $interfaces = get_configured_interface_with_descr();
foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if (!$config['interfaces'][$iface]['bridge'] && $selectedif == $iface) echo "selected"; ?>>
+ <option value="<?=$iface;?>" <?php if (!link_int_to_bridge_interface($iface) && $selectedif == $iface) echo "selected"; ?>>
<?php echo $ifacename;?>
</option>
<?php endforeach;?>
diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php
index 6ab024f..e80aa76 100755
--- a/usr/local/www/diag_ping.php
+++ b/usr/local/www/diag_ping.php
@@ -116,7 +116,7 @@ include("head.inc"); ?>
<select name="interface" class="formfld">
<?php $interfaces = get_configured_interface_with_descr();
foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if (!$config['interfaces'][$iface]['bridge'] && $iface == $interface) echo "selected"; ?>>
+ <option value="<?=$iface;?>" <?php if (!link_int_to_bridge_interface($iface) && $iface == $interface) echo "selected"; ?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index fa85300..8fa01f9 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -100,14 +100,8 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* make sure no interfaces are bridged */
- $iflist = get_configured_interface_list(true);
- foreach ($iflist as $if) {
- $coptif = &$config['interfaces'][$if];
- if ($coptif['bridge'] == $pconfig['cinterface']) {
- $input_errors[] = "The captive portal cannot be used when one or more interfaces are bridged.";
- break;
- }
- }
+ if (link_int_to_bridge_interface($pconfig['cinterface']))
+ $input_errors[] = "The captive portal cannot be used when one or more interfaces are bridged.";
if ($_POST['httpslogin_enable']) {
if (!$_POST['cert'] || !$_POST['key']) {
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 9bc3758..aebcb26 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -112,7 +112,7 @@ if(is_array($dhcrelaycfg)) {
if (isset($dhcrelayifconf['enable']) &&
(($dhcrelayif == "lan") ||
(isset($config['interfaces'][$dhcrelayif]['enable']) &&
- $config['interfaces'][$dhcrelayif]['if'] && (!$config['interfaces'][$dhcrelayif]['bridge']))))
+ $config['interfaces'][$dhcrelayif]['if'] && (!link_int_to_bridge_interface($dhcrelayif)))))
$dhcrelay_enabled = true;
}
}
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php
index 0cc6dc1..2e97ea7 100755
--- a/usr/local/www/services_wol.php
+++ b/usr/local/www/services_wol.php
@@ -116,7 +116,7 @@ include("head.inc");
<?php
$interfaces = get_configured_interface_with_descr();
foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if (!$config['interfaces'][$iface]['bridge'] && $iface == $if) echo "selected"; ?>>
+ <option value="<?=$iface;?>" <?php if (!link_int_to_bridge_interface($iface) && $iface == $if) echo "selected"; ?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
diff --git a/usr/local/www/services_wol_edit.php b/usr/local/www/services_wol_edit.php
index 17e1006..de3d271 100755
--- a/usr/local/www/services_wol_edit.php
+++ b/usr/local/www/services_wol_edit.php
@@ -117,7 +117,7 @@ include("head.inc");
<?php
$interfaces = get_configured_interface_with_descr();
foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if (!$config['interfaces'][$iface]['bridge'] && $iface == $pconfig['interface']) echo "selected"; ?>>
+ <option value="<?=$iface;?>" <?php if (!link_int_to_bridge_interface($iface) && $iface == $pconfig['interface']) echo "selected"; ?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
diff --git a/usr/local/www/widgets/widgets/services_status.widget.php b/usr/local/www/widgets/widgets/services_status.widget.php
index 5fe9d12..79f890a 100644
--- a/usr/local/www/widgets/widgets/services_status.widget.php
+++ b/usr/local/www/widgets/widgets/services_status.widget.php
@@ -73,7 +73,7 @@ $iflist = array("lan" => "LAN");
$ifdescrs = get_configured_interface_list(true);
foreach ($ifdescrs as $if) {
$oc = $config['interfaces'][$if];
- if ($oc['if'] && (!$oc['bridge']))
+ if ($oc['if'] && (!link_int_to_bridge_interface($if)))
$iflist[$if] = $if;
}
$show_dhcprelay = false;
OpenPOWER on IntegriCloud