From 38287b63da2c089d5fdc4f99bda7b3d3981209de Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 12 Oct 2005 20:19:48 +0000 Subject: Correctly return # of bridges --- etc/inc/interfaces.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'etc/inc') diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 3216641e..50b10bd 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1284,7 +1284,12 @@ function is_altq_capable($int) { function get_number_of_bridged_interfaces() { $bridges = array(); $bridges = split("\n", `/sbin/ifconfig -a | /usr/bin/grep bridge`); - return array_count_values($bridges); + $bridge_count = 0; + foreach($bridges as $bridge) { + $bridge_count++; + } + $bridge_count++; + return array_count_values($bridge_count); } function get_next_available_bridge_interface() { -- cgit v1.1