Skip to content

Commit 658702f

Browse files
fix(InterfaceField): add missing _vip prefix to carp ifs
The _vip prefix was not be properly applied to InterfaceField values allowing carp interfaces. This commit ensures the proper prefix is present when identifying available carp choices.
1 parent cfca8d9 commit 658702f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Fields/InterfaceField.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ class InterfaceField extends StringField {
219219
foreach ($virtual_ips as $virtual_ip) {
220220
# Only include CARP virtual iPs with unique IDs
221221
if ($virtual_ip['mode'] === 'carp' and $virtual_ip['uniqid']) {
222-
$choices[$virtual_ip['uniqid']] = $virtual_ip['uniqid'];
222+
$uniqid = "_vip".$virtual_ip['uniqid'];
223+
$choices[$uniqid] = $uniqid;
223224
}
224225
}
225226
}

0 commit comments

Comments
 (0)