ID:456 - Unable to disable the VLAN ID using ipmitool

Currently, when a LAN parameter set command is sent through ipmitool, the
corresponding parameter data is requested and compared to the command to verify
that the data was written correctly. Since we do send the VLAN ID in this return
data, regardless of whether VLAN is disabled or not, this mismatch between
requested and received parameters causes ipmitool to retry the command 10 times
and return an error.

ipmitool is sending "0x00 0x00" reading back data from BMC as "0x01 0x00" which
is NOT matching & hence pops up the error /warning "LAN Parameter Data does not
match! Write may have failed."
After 10 retries when we check "ipmitool lan print" VLAN ID is disabled
successfully.
This commit is contained in:
B BALAJI SINGH 2016-08-30 03:05:46 -04:00 committed by Zdenek Styblik
parent fa2c1550b9
commit 052655cd91

View File

@ -1204,13 +1204,28 @@ get_cmdline_ipaddr(char * arg, uint8_t * buf)
static int
ipmi_lan_set_vlan_id(struct ipmi_intf *intf, uint8_t chan, char *string)
{
struct lan_param *p;
uint8_t data[2];
int rc;
if (string == NULL) {
lprintf(LOG_DEBUG, "Get current VLAN ID from BMC.");
p = get_lan_param(intf, chan, IPMI_LANP_VLAN_ID);
if (p != NULL && p->data != NULL && p->data_len > 1) {
int id = ((p->data[1] & 0x0f) << 8) + p->data[0];
if (id < 1 || id > 4094) {
lprintf(LOG_ERR,
"Retrieved VLAN ID %i is out of range <1..4094>.",
id);
return (-1);
}
data[0] = p->data[0];
data[1] = p->data[1] & 0x0F;
} else {
data[0] = 0;
data[1] = 0;
}
}
else {
int id = 0;
if (str2int(string, &id) != 0) {