diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-04-24 00:27:17 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-04-24 00:27:17 +0000 |
commit | 9ce384096ac052ae45051085a406c9680bf9140a (patch) | |
tree | f010506f96e738e20b12377ef3dd9aaa916feca3 /etc/inc | |
parent | c35e12af353b774f46c2e6d8649dcd2934407454 (diff) | |
download | pfsense-9ce384096ac052ae45051085a406c9680bf9140a.zip pfsense-9ce384096ac052ae45051085a406c9680bf9140a.tar.gz |
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.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 17 | ||||
-rw-r--r-- | etc/inc/util.inc | 38 |
2 files changed, 31 insertions, 24 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 8528bc3..51a87e8 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -3378,7 +3378,22 @@ function is_dhcp_server_enabled() { function get_interfaces_with_gateway() { global $config; $ints = array(); - $ifdescrs = get_interface_list(); + $vfaces = array( + 'bridge.?*', + 'ppp.?*', + 'sl.?*', + 'gif.?*', + 'faith.?*', + 'lo.?*', + 'ng.?*', + 'vlan.?*', + 'pflog.?*', + 'pfsync.?*', + 'enc.?*', + 'tun.?*', + 'carp.?*' + ); + $ifdescrs = get_interface_list("active","physical",$vfaces); /* loop interfaces, check config for outbound */ foreach ($ifdescrs as $ifdescr => $ifname) { 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": |