mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
Properly handle plugin non-zero target adddress with -t specification Bug 292
This commit is contained in:
parent
c18ec02f33
commit
8d44c55feb
@ -925,24 +925,26 @@ ipmi_main(int argc, char ** argv,
|
||||
}
|
||||
|
||||
/* If bridging addresses are specified, handle them */
|
||||
if (transit_addr > 0 || target_addr > 0) {
|
||||
if (target_addr > 0) {
|
||||
ipmi_main_intf->target_addr = target_addr;
|
||||
ipmi_main_intf->target_lun = target_lun ;
|
||||
ipmi_main_intf->target_channel = target_channel ;
|
||||
}
|
||||
if (transit_addr > 0) {
|
||||
/* sanity check, transit makes no sense without a target */
|
||||
if ((transit_addr != 0 || transit_channel != 0) &&
|
||||
target_addr == 0) {
|
||||
ipmi_main_intf->target_addr == 0) {
|
||||
lprintf(LOG_ERR,
|
||||
"Transit address/channel %#x/%#x ignored. "
|
||||
"Target address must be specified!",
|
||||
transit_addr, transit_channel);
|
||||
goto out_free;
|
||||
}
|
||||
ipmi_main_intf->target_addr = target_addr;
|
||||
ipmi_main_intf->target_lun = target_lun ;
|
||||
ipmi_main_intf->target_channel = target_channel ;
|
||||
|
||||
ipmi_main_intf->transit_addr = transit_addr;
|
||||
ipmi_main_intf->transit_channel = transit_channel;
|
||||
|
||||
|
||||
}
|
||||
if (ipmi_main_intf->target_addr > 0) {
|
||||
/* must be admin level to do this over lan */
|
||||
ipmi_intf_session_set_privlvl(ipmi_main_intf, IPMI_SESSION_PRIV_ADMIN);
|
||||
/* Get the ipmb address of the targeted entity */
|
||||
|
Loading…
x
Reference in New Issue
Block a user