Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions redfish-core/lib/log_services.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1685,10 +1685,12 @@ inline bool isAllowedIP(const crow::Request& req)
{
std::string ipStr = req.ipAddress.to_string();
// IP of the USB vNIC
constexpr std::string_view allowedIp = "192.168.31.2";
constexpr std::string_view allowedIp1 = "192.168.31.1";
constexpr std::string_view allowedIp2 = "192.168.31.2";

// Check if the IP string contains the allowed IP
if (ipStr.find(allowedIp) == std::string::npos)
if (ipStr.find(allowedIp1) == std::string::npos &&
ipStr.find(allowedIp2) == std::string::npos)
{
BMCWEB_LOG_ERROR("Unmatched IP: {} ", ipStr);
return false;
Expand All @@ -1698,7 +1700,6 @@ inline bool isAllowedIP(const crow::Request& req)

inline void requestRoutesJournalEventLogEntryPost(App& app)
{
BMCWEB_LOG_ERROR("Entred: requestRoutesEventLogEntriesPost");
BMCWEB_ROUTE(app, "/redfish/v1/Systems/<str>/LogServices/EventLog")
.privileges(redfish::privileges::postLogEntry)
.methods(boost::beast::http::verb::post)(
Expand Down Expand Up @@ -1752,7 +1753,6 @@ inline void requestRoutesJournalEventLogEntryPost(App& app)

inline void requestRoutesDBusEventLogEntryPost(App& app)
{
BMCWEB_LOG_ERROR("Entred: requestRoutesEventLogEntriesPost");
BMCWEB_ROUTE(app, "/redfish/v1/Systems/<str>/LogServices/EventLog")
.privileges(redfish::privileges::postLogEntry)
.methods(boost::beast::http::verb::post)(
Expand Down