summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/channel.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/channel.cpp b/app/channel.cpp
index 91cbe88..7006c92 100644
--- a/app/channel.cpp
+++ b/app/channel.cpp
@@ -148,6 +148,15 @@ ipmi::RspType<uint8_t, // Channel Number
algoSelectBit ? cipherRecords : supportedAlgorithms;
static constexpr auto respSize = 16;
+ // Session support is available in active LAN channels.
+ if ((ipmi::getChannelSessionSupport(rspChannel) ==
+ ipmi::EChannelSessSupported::none) ||
+ !(ipmi::doesDeviceExist(rspChannel)))
+ {
+ log<level::DEBUG>("Get channel cipher suites - Device does not exist");
+ return ipmi::responseInvalidFieldRequest();
+ }
+
// List index(00h-3Fh), 0h selects the first set of 16, 1h selects the next
// set of 16 and so on.
OpenPOWER on IntegriCloud