From 9ce384096ac052ae45051085a406c9680bf9140a Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 24 Apr 2007 00:27:17 +0000 Subject: The earlier fix from today that fixed get_interfaces_with_gateways() created new problem where all interfaces would show up in assign_interfaces screen and other places. Instead of showing them all by default teach get_interfaces_with_gateways() how to extract the complete list. --- etc/inc/util.inc | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) (limited to 'etc/inc/util.inc') diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 7417695..0d2eea9 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -255,34 +255,26 @@ function is_valid_shaperbw($val) { * "media" - use ifconfig to check physical connection * status (much slower) */ -/* - * get_interface_list() - Return a list of all physical interfaces - * along with MAC and status. - * - * $mode = "active" - use ifconfig -lu - * "media" - use ifconfig to check physical connection - * status (much slower) - */ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "") { global $config; $upints = array(); /* get a list of virtual interface types */ if(!$vfaces) { - $vfaces = array( - 'bridge.?*', - 'ppp.?*', - 'sl.?*', - 'gif.?*', - 'faith.?*', - 'lo.?*', - 'ng.?*', - 'vlan.?*', - 'pflog.?*', - 'pfsync.?*', - 'enc.?*', - 'tun.?*', - 'carp.?*' - ); + $vfaces = array ( + 'bridge', + 'ppp', + 'sl', + 'gif', + 'faith', + 'lo', + 'ng', + 'vlan', + 'pflog', + 'pfsync', + 'enc', + 'tun', + 'carp' + ); } switch($mode) { case "active": -- cgit v1.1