commit | a291f49a5a0353c9e841ff7ae004d9b2eb956bae | [log] [tgz] |
---|---|---|
author | Johnathan Mantey <johnathanx.mantey@intel.com> | Fri Oct 15 13:45:27 2021 -0700 |
committer | Johnathan Mantey <johnathanx.mantey@intel.com> | Thu Oct 28 14:18:40 2021 +0000 |
tree | a6a14231a0a38de19f961aaf82b3524a1ebd0dfb | |
parent | 3c3645a5bb86eadc17ac861b4371fdef70864489 [diff] |
Return invalid argument error code when assigning IPv6StaticAddreses Testing the IPv6 IPMI commands identified a situation where Set LAN Configuration threw an exception. The exception occurred because the input values supplied to assign an IPv6 Static Address were invalid. The expectation is that ipmitool would emit a 0xcc (Invalid input data) error code. The error handler designed to manage any un-caught exception, is returning the "Unspecified Error" code. In order to resolve the problem the function call that fails is wrapped in a try/catch block. The catch looks for the InvalidArgument exception, and explicitly returns the 0xcc response code. All other exceptions are rethrown, and will result in the Unspecified Error code being reported. The offending command: The command tries to ENABLE a static IPv6 assignment of ::/0 ipmitool raw 0x0c 0x01 0x01 0x38 0x00 0x80 0x00 0x00 0x00 0x00 0x00 \ 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Tested: Confirmed the offending assignment results in a 0xcc code. Confirmed a non-matching exception results in a 0xff code. Note: This was done by explicitly making the InvalidArgument string comparison mismatch. It was not due to observation of an un-caught exception. Change-Id: I3b9590be624ff3a49f12f34bfa66c8aeee7b3b94 Signed-off-by: Johnathan Mantey <johnathanx.mantey@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
.