diff --git a/includes/html/pages/device/edit/ipmi.inc.php b/includes/html/pages/device/edit/ipmi.inc.php index 13fb0b7d5a..7c8fe8faa8 100644 --- a/includes/html/pages/device/edit/ipmi.inc.php +++ b/includes/html/pages/device/edit/ipmi.inc.php @@ -3,6 +3,7 @@ if ($_POST['editing']) { if (Auth::user()->hasGlobalAdmin()) { $ipmi_hostname = mres($_POST['ipmi_hostname']); + $ipmi_port = (int) $_POST['ipmi_port']; $ipmi_username = mres($_POST['ipmi_username']); $ipmi_password = mres($_POST['ipmi_password']); @@ -12,6 +13,12 @@ if ($_POST['editing']) { del_dev_attrib($device, 'ipmi_hostname'); } + if ($ipmi_port != '') { + set_dev_attrib($device, 'ipmi_port', $ipmi_port); + } else { + set_dev_attrib($device, 'ipmi_port', '623'); // Default port + } + if ($ipmi_username != '') { set_dev_attrib($device, 'ipmi_username', $ipmi_username); } else { @@ -50,6 +57,12 @@ if ($updated && $update_message) { +