--- a/usr/local/www/status_dhcpv6_leases.php 2024-04-16 02:00:41.000000000 +0200 +++ b/usr/local/www/status_dhcpv6_leases.php 2024-04-18 18:32:15.120704000 +0200 @@ -191,7 +191,7 @@ foreach (config_get_path('interfaces', []) as $ifname => $ifarr) { if (is_array($config['dhcpdv6'][$ifname]) && is_array($config['dhcpdv6'][$ifname]['staticmap'])) { - foreach ($config['dhcpdv6'][$ifname]['staticmap'] as $static) { + foreach ($config['dhcpdv6'][$ifname]['staticmap'] as $idx => $static) { $slease = array(); $slease['ip'] = merge_ipv6_delegated_prefix(get_interface_ipv6($ifname), $static['ipaddrv6'], get_interface_subnetv6($ifname)); $slease['type'] = "static"; @@ -205,6 +205,7 @@ } else { $slease['online'] = $offline_string; } + $slease['staticmap_array_index'] = $idx; $leases[] = $slease; } @@ -346,6 +347,8 @@ $icon = 'fa-solid fa-user'; } + $data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip'])); + if ($data['act'] !== $static_string) { foreach (config_get_path('dhcpdv6', []) as $dhcpif => $dhcpifconf) { if (empty($dhcpifconf)) { @@ -355,8 +358,6 @@ if (!is_array($dhcpifconf['range']) || !isset($dhcpifconf['enable'])) { continue; } - - $data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip'])); if (is_inrange_v6($data['ip'], $dhcpifconf['range']['from'], $dhcpifconf['range']['to'])) { $dlskey = $data['if'] . '-' . $dhcpifconf['range']['from'];