ID:367 - Fix building of non-bridged LAN interface commands

When bridging is used (-t specifies an address which is different from 20h),
presession command must go to BMC_SLAVE_ADDR, not to target_addr.
BMC_SLAVE_ADDR is always used as the responder address in outer Send Message
request, when message is forwarded. Use the same approach for non-bridged
commands.

Commit for:  Dmitry Bazhenov
This commit is contained in:
Zdenek Styblik 2015-07-25 12:53:16 +02:00
parent 24fd406506
commit fb6e311d27

View File

@ -818,7 +818,7 @@ ipmi_lan_build_cmd(struct ipmi_intf * intf, struct ipmi_rq * req, int isRetry)
}
/* ipmi message header */
msg[len++] = intf->target_addr;
msg[len++] = entry->bridging_level ? intf->target_addr : IPMI_BMC_SLAVE_ADDR;
msg[len++] = req->msg.netfn << 2 | (req->msg.lun & 3);
tmp = len - cs;
msg[len++] = ipmi_csum(msg+cs, tmp);