Added VLAN ID checking condition in Set LAN config
According to the VLAN 802.1VLAN spec, VLAN ID should be 1-4095
Unit test:
Verified VLAN ID 1-4095 is allowed and CC returns for 0 & > 4095
Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
Change-Id: I54bbc94c814c98dda11f8241fa31bfe0e5bbb150
diff --git a/transporthandler.hpp b/transporthandler.hpp
index 04d4673..5896082 100644
--- a/transporthandler.hpp
+++ b/transporthandler.hpp
@@ -79,6 +79,8 @@
IPV6_NEIGHBOR_TIMING_CONFIGURATION = 80,
};
+// Data length of parameters
+constexpr size_t lanParamVLANSize = 4;
constexpr uint8_t SET_COMPLETE = 0;
constexpr uint8_t SET_IN_PROGRESS = 1;
constexpr uint8_t SET_COMMIT_WRITE = 2; // Optional
@@ -136,3 +138,4 @@
* @param[in] channel: channel number.
*/
void applyChanges(int channel);
+constexpr uint16_t maxValidVLANIDValue = 4095;