interfaces - index carp entries by vhid's in legacy_interfaces_details() to ease referencing items.

since the indexes themselves aren't used, it should be safe to change the current list interpretation into a named one, this would ease operations like https://github.com/opnsense/core/pull/5184
This commit is contained in:
Ad Schellevis 2021-08-29 13:54:43 +02:00
parent 519311433d
commit e44fd48b6a

View File

@ -360,7 +360,7 @@ function legacy_interfaces_details($intf = null)
if (empty($result[$current_interface]["carp"])) {
$result[$current_interface]["carp"] = array();
}
$result[$current_interface]["carp"][] = array(
$result[$current_interface]["carp"][$line_parts[3]] = array(
"status" => $line_parts[1],
"vhid" => $line_parts[3],
"advbase" => $line_parts[5],