Project

General

Profile

Bug #366 » 0001-Revert-Fix-the-check-for-whether-the-bridge-is-assi.patch

Erik Fonnesbeck, 02/24/2010 02:36 PM

View differences:

usr/local/www/interfaces_bridge.php
46 46

  
47 47
$a_bridges = &$config['bridges']['bridged'] ;
48 48

  
49
function bridge_inuse($bridgeif) {
49
function bridge_inuse($num) {
50 50
	global $config;
51 51

  
52 52
	$iflist = get_configured_interface_list(false, true);
53 53
	foreach ($iflist as $if) {
54
		if ($config['interfaces'][$if]['if'] == $bridgeif)
54
		if ($config['interfaces'][$if]['if'] == $a_bridges[$num]['bridgeif'])
55 55
			return true;
56 56
	}
57 57

  
......
60 60

  
61 61
if ($_GET['act'] == "del") {
62 62
	/* check if still in use */
63
	if (bridge_inuse($a_bridges[$_GET['id']]['bridgeif'])) {
63
	if (bridge_inuse($_GET['id'])) {
64 64
		$input_errors[] = "This bridge TUNNEL cannot be deleted because it is still being used as an interface.";
65 65
	} else {
66 66
		mwexec("/sbin/ifconfig " . $a_bridges[$_GET['id']]['bridgeif'] . " destroy");
(2-2/3)