vlan id should be 32 bit
Upstream yocto appears to bring in a new compiler which is flagging the
inconsistency of the VLAN ID data type and failing to compile bmcweb
because of it.
The redfish specification lists the datatype for VLANId as a integer
that can range from 0-4094.
Here's the error:
/lib/ethernet.hpp:2221:58: error: no matching function for call to 'std::variant<unsigned int>::variant(uint64_t&)'
| 2221 | std::variant<uint32_t>(vlanId));
Change-Id: Ic92ad6518a9529f5099a1eaf1250df106119d319
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 04759fe..1f65254 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -2187,7 +2187,7 @@
}
bool vlanEnable = false;
- uint64_t vlanId = 0;
+ uint32_t vlanId = 0;
if (!json_util::readJson(req, res, "VLANEnable", vlanEnable, "VLANId",
vlanId))