summaryrefslogtreecommitdiffstats
path: root/libipmid/utils.cpp
diff options
context:
space:
mode:
authorJohnathan Mantey <johnathanx.mantey@intel.com>2019-12-17 09:18:34 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2020-01-31 15:56:38 +0000
commit930104a86aa997ba91bd6d588eb3abda39c2fa52 (patch)
tree5a5ac20bdfafe2cd467e3fed8ba8d43b4293f64d /libipmid/utils.cpp
parent4e1fe77dfde1291b48d4109f3bb89077809d24a2 (diff)
downloadphosphor-host-ipmid-930104a86aa997ba91bd6d588eb3abda39c2fa52.tar.gz
phosphor-host-ipmid-930104a86aa997ba91bd6d588eb3abda39c2fa52.zip
Return an error when assigning static values to a DHCP enabled NIC
Assigning static IP addresses, subnet masks, and gateway values to a DHCP enabled NIC should be flagged with an error response to indicate the operation was not completed successfully. Tested: Used some raw commands to witness the return code directly -- Enable DHCP for NIC 3 ipmitool lan set 3 ipsrc dhcp -- Assign a static IPv4 Address, expect a failure ipmitool raw 0xc 1 3 3 192 168 20 12 # returns 0xd5 error message -- Assign a static IPv4 Subnet mask, expect a failure ipmitool raw 0xc 1 3 6 255 255 255 0 # returns 0xd5 error message -- Assign a static IPv4 Gateway, expect a failure ipmitool raw 0xc 1 3 12 192 168 20 1 # returns 0xd5 error message -- Enable Static address assignment for NIC 3 ipmitool lan set 3 ipsrc static -- Assign a static IPv4 Address, expect success ipmitool raw 0xc 1 3 3 192 168 20 12 # returns successfully -- Assign a static IPv4 Subnet mask, expect success ipmitool raw 0xc 1 3 6 255 255 255 0 # returns successfully -- Assign a static IPv4 Gateway, expect success ipmitool raw 0xc 1 3 12 192 168 20 1 # returns successfully IPv4 settings have been updated. Change-Id: I807ec45a0c86b33dd46bfeb64724b91d5afad408 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
Diffstat (limited to 'libipmid/utils.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud