network: fix dhcp values in redfish response
Whenever IPv6 SLAAC is enabled and DHCPv4 is enabled, the "DHCPEnabled"
value in the backend will be "v4v6stateless". Currently in bmcweb,
the check to translate this value to bool for ipv4 is not present and
will return false. That means, "DHCPEnabled" is wrongly displayed
'false' while the correct value is 'true'.
Change-Id: I8713d73727c6a382f06b7bf0d598ab61a757e1e3
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index d044120..515f0f2 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -143,7 +143,9 @@
(inputDHCP ==
"xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v4") ||
(inputDHCP ==
- "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.both"));
+ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.both") ||
+ (inputDHCP ==
+ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v4v6stateless"));
}
return ((inputDHCP ==
"xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v6") ||