diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2010-01-11 21:44:55 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2010-01-11 21:44:55 +0100 |
commit | 4563d12f70a4f5d03fabeaffe4c64c409c5acb0e (patch) | |
tree | 388fce4d29ebaccc7291dd8a054fd5a31d836445 /etc/inc/rrd.inc | |
parent | 981a2fbeb429264e3bf6031ee5a1f4f184850b7f (diff) | |
download | pfsense-4563d12f70a4f5d03fabeaffe4c64c409c5acb0e.zip pfsense-4563d12f70a4f5d03fabeaffe4c64c409c5acb0e.tar.gz |
Make get_real_interface return real interface enc0 for "ipsec". Refactor enable_rrd_graphing() to
use get_configured_interface_with_descr()
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r-- | etc/inc/rrd.inc | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index 76aac89..fa0500f 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -249,33 +249,15 @@ function enable_rrd_graphing() { $rrdupdatesh .= ""; $i = 0; - $vfaces = array ( - "vlan.?*", - "enc.?*" - ); - $ifdescrs = get_interface_list(true, true, $vfaces); - $ifdescrs['enc0']['friendly'] = "ipsec"; - $ifdescrs['enc0']['descr'] = "IPsec"; - $ifdescrs['enc0']['up'] = true; - - foreach ($ifdescrs as $realif => $ifdescr) { - $ifname = $ifdescr['friendly']; - $state = $ifdescr['up']; + $ifdescrs = get_configured_interface_with_descr(); + $ifdescrs['ipsec'] = "IPsec"; + + foreach ($ifdescrs as $ifname => $ifdescr) { $temp = get_real_interface($ifname); if($temp <> "") { $realif = $temp; } - /* skip interfaces that do not have a friendly name */ - if ("$ifname" == "") { - continue; - } - - /* or are down */ - if (!$state) { - continue; - } - /* TRAFFIC, set up the rrd file */ if (!file_exists("$rrddbpath$ifname$traffic")) { $rrdcreate = "$rrdtool create $rrddbpath$ifname$traffic --step $rrdtrafficinterval "; |