mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
allow SOL port to be sent in network byte order since some BMCs do this
This commit is contained in:
parent
083e6afc46
commit
6d77f698f2
@ -1497,10 +1497,20 @@ ipmi_sol_activate(struct ipmi_intf * intf)
|
||||
intf->session->timeout = 3;
|
||||
|
||||
|
||||
/* NOTE: the spec does allow for SOL traffic to be sent on
|
||||
* a different port. we do not yet support that feature. */
|
||||
if (intf->session->sol_data.port != intf->session->port)
|
||||
{
|
||||
lprintf(LOG_ERR, "Error: BMC requests SOL session on different port");
|
||||
return -1;
|
||||
/* try byteswapping port in case BMC sent it incorrectly */
|
||||
uint16_t portswap = BSWAP_16(intf->session->sol_data.port);
|
||||
|
||||
if (portswap == intf->session->port) {
|
||||
intf->session->sol_data.port = portswap;
|
||||
}
|
||||
else {
|
||||
lprintf(LOG_ERR, "Error: BMC requests SOL session on different port");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user