From 3a669df20b0795b2e487fc033f86eacea7e6fdf4 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Sat, 20 Feb 2010 21:37:56 -0700 Subject: Fix the check for whether the bridge is assigned. --- usr/local/www/interfaces_bridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/interfaces_bridge.php b/usr/local/www/interfaces_bridge.php index 2806005..8cb8bda 100644 --- a/usr/local/www/interfaces_bridge.php +++ b/usr/local/www/interfaces_bridge.php @@ -46,12 +46,12 @@ if (!is_array($config['bridges']['bridged'])) $a_bridges = &$config['bridges']['bridged'] ; -function bridge_inuse($num) { +function bridge_inuse($bridgeif) { global $config; $iflist = get_configured_interface_list(false, true); foreach ($iflist as $if) { - if ($config['interfaces'][$if]['if'] == $a_bridges[$num]['bridgeif']) + if ($config['interfaces'][$if]['if'] == $bridgeif) return true; } @@ -60,7 +60,7 @@ function bridge_inuse($num) { if ($_GET['act'] == "del") { /* check if still in use */ - if (bridge_inuse($_GET['id'])) { + if (bridge_inuse($a_bridges[$_GET['id']]['bridgeif'])) { $input_errors[] = "This bridge TUNNEL cannot be deleted because it is still being used as an interface."; } else { mwexec("/sbin/ifconfig " . $a_bridges[$_GET['id']]['bridgeif'] . " destroy"); -- cgit v1.1