commit | 6d4a44ed2bbfdac7c20029bf212eb2b60ecefbc4 | [log] [tgz] |
---|---|---|
author | Jiaqing Zhao <jiaqing.zhao@intel.com> | Mon Jan 24 15:04:00 2022 +0800 |
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | Wed Apr 13 00:46:49 2022 +0000 |
tree | 203002ea98b253e9d238dc8b39f074de752f8ced | |
parent | 23f44657333de5e01ba4b78a4b14e57c42188ef8 [diff] |
Check prefix length in Set LAN Config Param 6 & 56 In phosphor-networkd, the allowed prefix length is 1 to 32 for IPv4 and 1 to 128 for IPv6. Calling DBus API with an invalid prefix length will result in uncaught exceptions. This patch checks prefix length before setting it and returns appropriate error code on invalid value. Tested: * Setting IPv4 SubnetMask to 0.0.0.0 (Param 6) returns 0xcc. * Setting IPv6 static address with PrefixLength==129 (Param 56) returns 0xc9. Change-Id: I03af233905e415c96c896c85baf98846d0880e95 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
To build this package, do the following steps:
1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make
To clean the repository run ./bootstrap.sh clean
.