aboutsummaryrefslogtreecommitdiffstats
path: root/config/openospfd/openospfd.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/openospfd/openospfd.inc')
-rw-r--r--config/openospfd/openospfd.inc20
1 files changed, 19 insertions, 1 deletions
diff --git a/config/openospfd/openospfd.inc b/config/openospfd/openospfd.inc
index e0764031..c131142a 100644
--- a/config/openospfd/openospfd.inc
+++ b/config/openospfd/openospfd.inc
@@ -27,6 +27,24 @@
POSSIBILITY OF SUCH DAMAGE.
*/
+function ospfd_display_friendlyiface () {
+ global $evaledvar, $config, $g;
+
+ if (intval($g['latest_config']) >= 6)
+ return;
+
+ if ($evaledvar) {
+ foreach ($evaledvar as $idx => $field) {
+ if ($field['interface']) {
+ if (empty($config['interfaces'][$field['interface']]['descr']))
+ $evaledvar[$idx]['interface'] = strtoupper($evaledvar[$idx]['interface']);
+ else
+ $evaledvar[$idx]['interface'] = $config['interfaces'][$field['interface']]['descr'];
+ }
+ }
+ }
+}
+
function ospfd_install_conf() {
global $config, $g, $input_errors;
@@ -222,4 +240,4 @@ function is_ospfd_running() {
return false;
}
-?> \ No newline at end of file
+?>