diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-12 20:19:48 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-12 20:19:48 +0000 |
commit | 38287b63da2c089d5fdc4f99bda7b3d3981209de (patch) | |
tree | e8a4a91b79134e5d4096021ef61357b93685b3bc | |
parent | 26eb3795a1a4a19cf8bca101a571b3944501bcf2 (diff) | |
download | pfsense-38287b63da2c089d5fdc4f99bda7b3d3981209de.zip pfsense-38287b63da2c089d5fdc4f99bda7b3d3981209de.tar.gz |
Correctly return # of bridges
-rw-r--r-- | etc/inc/interfaces.inc | 7 |
1 files changed, 6 insertions, 1 deletions
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() { |