diff options
author | Patrick Huesmann <info@patrick-huesmann.de> | 2021-01-27 13:02:57 +0100 |
---|---|---|
committer | Alexander Amelkin <mocbuhtig@amelkin.msk.ru> | 2021-09-15 16:39:55 +0300 |
commit | 7c47cf75f415df17539e38ec8aac740ae0d05e9d (patch) | |
tree | 5e1866fed545952c36abeab6674e96deef625dd6 | |
parent | b7adc1dcafd1f2a3f97063d84176591047bb335e (diff) | |
download | ipmitool-7c47cf75f415df17539e38ec8aac740ae0d05e9d.tar.gz |
Fix double bridge detection in get_max_(req|rsp)_data_size()
Signed-off-by: Patrick Huesmann <info@patrick-huesmann.de>
-rw-r--r-- | src/plugins/ipmi_intf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/ipmi_intf.c b/src/plugins/ipmi_intf.c index f09c289..501d4b0 100644 --- a/src/plugins/ipmi_intf.c +++ b/src/plugins/ipmi_intf.c @@ -508,7 +508,7 @@ ipmi_intf_get_max_request_data_size(struct ipmi_intf * intf) /* check if request size is not specified */ if (!size) { /* - * The IPMB standard overall message length for ‘non -bridging’ + * The IPMB standard overall message length for non-bridging * messages is specified as 32 bytes, maximum, including slave * address. This sets the upper limit for typical IPMI messages. * With the exception of messages used for bridging messages to @@ -541,7 +541,8 @@ ipmi_intf_get_max_request_data_size(struct ipmi_intf * intf) } /* check for double bridging */ - if (intf->transit_addr && intf->transit_addr != intf->target_addr) { + if (intf->transit_addr && + (intf->transit_addr != intf->target_addr || intf->transit_channel != intf->target_channel) { /* subtract inner send message request size */ size -= 8; } @@ -565,7 +566,7 @@ ipmi_intf_get_max_response_data_size(struct ipmi_intf * intf) /* check if response size is not specified */ if (!size) { /* - * The IPMB standard overall message length for ‘non -bridging’ + * The IPMB standard overall message length for non-bridging * messages is specified as 32 bytes, maximum, including slave * address. This sets the upper limit for typical IPMI messages. * With the exception of messages used for bridging messages to @@ -603,7 +604,8 @@ ipmi_intf_get_max_response_data_size(struct ipmi_intf * intf) } /* check for double bridging */ - if (intf->transit_addr && intf->transit_addr != intf->target_addr) { + if (intf->transit_addr && + (intf->transit_addr != intf->target_addr || intf->transit_channel != intf->target_channel) { /* subtract inner send message header size */ size -= 8; } |