remove unused enable/disableNetworkIPMI functions
enableNetworkIPMI and disableNetworkIPMI were legacy functions from
before implementing separate netipmid instances for each network
interface.
Change-Id: Ife54412e9dcb86f96309db2cda071de70405b29d
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/app/channel.cpp b/app/channel.cpp
index 51e953d..7d51bfe 100644
--- a/app/channel.cpp
+++ b/app/channel.cpp
@@ -177,68 +177,3 @@
return ipmi::responseSuccess(rspChannel, rspRecords);
}
-
-template <typename... ArgTypes>
-static int executeCmd(const char* path, ArgTypes&&... tArgs)
-{
- boost::process::child execProg(path, const_cast<char*>(tArgs)...);
- execProg.wait();
- return execProg.exit_code();
-}
-
-/** @brief Enable the network IPMI service on the specified ethernet interface.
- *
- * @param[in] intf - ethernet interface on which to enable IPMI
- */
-void enableNetworkIPMI(const std::string& intf)
-{
- // Check if there is a iptable filter to drop IPMI packets for the
- // interface.
- auto retCode =
- executeCmd("/usr/sbin/iptables", "-C", "INPUT", "-p", "udp", "-i",
- intf.c_str(), "--dport", "623", "-j", "DROP");
-
- // If the iptable filter exists, delete the filter.
- if (!retCode)
- {
- auto response =
- executeCmd("/usr/sbin/iptables", "-D", "INPUT", "-p", "udp", "-i",
- intf.c_str(), "--dport", "623", "-j", "DROP");
-
- if (response)
- {
- log<level::ERR>("Dropping the iptables filter failed",
- entry("INTF=%s", intf.c_str()),
- entry("RETURN_CODE:%d", response));
- }
- }
-}
-
-/** @brief Disable the network IPMI service on the specified ethernet interface.
- *
- * @param[in] intf - ethernet interface on which to disable IPMI
- */
-void disableNetworkIPMI(const std::string& intf)
-{
- // Check if there is a iptable filter to drop IPMI packets for the
- // interface.
- auto retCode =
- executeCmd("/usr/sbin/iptables", "-C", "INPUT", "-p", "udp", "-i",
- intf.c_str(), "--dport", "623", "-j", "DROP");
-
- // If the iptable filter does not exist, add filter to drop network IPMI
- // packets
- if (retCode)
- {
- auto response =
- executeCmd("/usr/sbin/iptables", "-I", "INPUT", "-p", "udp", "-i",
- intf.c_str(), "--dport", "623", "-j", "DROP");
-
- if (response)
- {
- log<level::ERR>("Inserting iptables filter failed",
- entry("INTF=%s", intf.c_str()),
- entry("RETURN_CODE:%d", response));
- }
- }
-}