From 05922760bd05dca42a34fae7094eb798ba14bca5 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 22 Aug 2022 08:55:23 +0200 Subject: [PATCH] interfaces: status page warnings and dhcp6link fix; closes #5974 The buttons shown do the same for IPv4 and IPv6 so that might be a bit misleading, but let's go from here. --- src/etc/inc/interfaces.inc | 9 ++++++ src/www/status_interfaces.php | 61 ++++++++++++++++------------------- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index c7cb0f18d..04c222bc0 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -4017,6 +4017,15 @@ function get_interfaces_info($include_unlinked = false) } } + switch ($config['interfaces'][$ifdescr]['ipaddrv6'] ?? '') { + case 'dhcp6': + $ifinfo['dhcp6link'] = isvalidpid('/var/run/dhcp6c.pid') ? 'up' : 'down'; + break; + /* XXX more to do here in the future */ + default: + break; + } + if ($ifinfo['status'] == "up") { $wifconfiginfo = array(); if (is_interface_wireless($ifdescr)) { diff --git a/src/www/status_interfaces.php b/src/www/status_interfaces.php index 41eab0ff3..89ab3196d 100644 --- a/src/www/status_interfaces.php +++ b/src/www/status_interfaces.php @@ -75,6 +75,9 @@ include("head.inc"); $pfctl_counters = json_decode(configd_run('filter list counters json'), true); $vmstat_interrupts = json_decode(configd_run('system list interrupts json'), true); foreach (get_interfaces_info(true) as $ifdescr => $ifinfo): + if ($ifinfo['if'] == 'pfsync0') { + continue; + } $ifpfcounters = $pfctl_counters[$ifinfo['if']]; legacy_html_escape_form_data($ifinfo); $ifdescr = htmlspecialchars($ifdescr); @@ -117,13 +120,12 @@ include("head.inc"); - + " data-toggle="tooltip"> - + - + @@ -136,9 +138,8 @@ include("head.inc"); - + + @@ -151,9 +152,8 @@ include("head.inc"); - + + @@ -166,9 +166,8 @@ include("head.inc"); - + + @@ -181,9 +180,8 @@ include("head.inc"); - + + @@ -196,9 +194,8 @@ include("head.inc"); - + + @@ -215,16 +212,14 @@ include("head.inc"); - + + - + + @@ -236,19 +231,17 @@ include("head.inc"); ?> - + + - + @@ -270,7 +263,7 @@ include("head.inc"); if (!empty($ifinfo['gateway'])): ?> - + : - + :