mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
Incorrect byteswap in SOL maximum payload code
max_inbound_payload_size, max_outbound_payload_size and port are assembled byte by byte using shifts. This works correctly in both little and big endian and doing a subsequent byte swap is wrong. To highlight this issue I dumped the values on a big endian machine: max_inbound_payload_size 51200 max_outbound_payload_size 51200 port 28418 And after this fix: max_inbound_payload_size 200 max_outbound_payload_size 200 port 623 Signed-off-by: Zdenek Styblik <stybla@turnovfree.net>
This commit is contained in:
parent
2c7526be6b
commit
8d5e8fcf7a
@ -1830,17 +1830,6 @@ ipmi_sol_activate(struct ipmi_intf * intf, int looptest, int interval,
|
||||
(ap_rsp.payload_udp_port[1] << 8) |
|
||||
ap_rsp.payload_udp_port[0];
|
||||
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
intf->session->sol_data.max_inbound_payload_size =
|
||||
BSWAP_16(intf->session->sol_data.max_inbound_payload_size);
|
||||
intf->session->sol_data.max_outbound_payload_size =
|
||||
BSWAP_16(intf->session->sol_data.max_outbound_payload_size);
|
||||
intf->session->sol_data.port =
|
||||
BSWAP_16(intf->session->sol_data.port);
|
||||
#endif
|
||||
|
||||
|
||||
intf->session->timeout = 1;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user