Fix for Subnet Mask update

User unable to update Subnet Mask and getting error as Unspecified
error. The existing condition is only evaluating the IP Address and
not evaluating the Subnet Mask. This is preventing user to update
subnet mask. Update the condition to consider the case of setting
subnet mask as well.

Tested:
verified by executing set Lan configuration IPMI command
Before fix:
Command : ipmitool raw 0x0C 0x01 0x03 0x06 0xFF 0xFF 0xFE 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0xc lun=0x0
          cmd=0x1 rsp=0xff): Unspecified error

After fix:
Command : ipmitool raw 0x0C 0x01 0x03 0x06 0xFF 0xFF 0xFE 0x00
Response:                               //Success
Command : ipmitool lan print 3
Response:
Set in Progress         : Set Complete
Auth Type Support       :
Auth Type Enable        : Callback :
                        : User     :
                        : Operator :
                        : Admin    :
                        : OEM      :
IP Address Source       : Static Address
IP Address              : 10.xxx.xx.xx
Subnet Mask             : 255.255.254.0
MAC Address             : 00:xx:xx:xx:xx:xx
Default Gateway IP      : 10.xxx.xxx.1
Default Gateway MAC     : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
RMCP+ Cipher Suites     : 17
Cipher Suite Priv Max   : aaaaaaaaaaaaaaa
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
Bad Password Threshold  : Not Available

Signed-off-by: athuljox <athulx.joseph@intel.com>
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I6fbb9d0377ba03d7dc8296c7b4e29d73bdc99981
1 file changed
tree: b32cec16ccebb1455345976319ddda5c4937a28a
  1. app/
  2. dbus-sdr/
  3. docs/
  4. include/
  5. libipmid/
  6. scripts/
  7. softoff/
  8. subprojects/
  9. test/
  10. user_channel/
  11. xyz/
  12. .build.sh
  13. .clang-format
  14. .gitignore
  15. .shellcheck
  16. .travis.yml
  17. apphandler.cpp
  18. apphandler.hpp
  19. chassishandler.cpp
  20. chassishandler.hpp
  21. dcmihandler.cpp
  22. dcmihandler.hpp
  23. elog-errors.hpp
  24. error-HostEvent.hpp
  25. fruread.hpp
  26. generate_whitelist.sh
  27. generate_whitelist_create.sh
  28. globalhandler.cpp
  29. globalhandler.hpp
  30. groupext.cpp
  31. host-cmd-manager.cpp
  32. host-cmd-manager.hpp
  33. host-interface.cpp
  34. host-interface.hpp
  35. host-ipmid-whitelist.conf
  36. ipmi_fru_info_area.cpp
  37. ipmi_fru_info_area.hpp
  38. ipmid-new.cpp
  39. ipmisensor.cpp
  40. ipmiwhitelist.hpp
  41. LICENSE
  42. meson.build
  43. meson_options.txt
  44. OWNERS
  45. read_fru_data.cpp
  46. read_fru_data.hpp
  47. README.md
  48. selutility.cpp
  49. selutility.hpp
  50. sensordatahandler.cpp
  51. sensordatahandler.hpp
  52. sensorhandler.cpp
  53. sensorhandler.hpp
  54. settings.cpp
  55. settings.hpp
  56. storageaddsel.cpp
  57. storageaddsel.hpp
  58. storagehandler.cpp
  59. storagehandler.hpp
  60. sys_info_param.cpp
  61. sys_info_param.hpp
  62. systemintfcmds.cpp
  63. systemintfcmds.hpp
  64. testaddsel.cpp
  65. testit.cpp
  66. transporthandler.cpp
  67. transporthandler.hpp
  68. whitelist-filter.cpp
README.md

Compile ipmid with default options:

meson builddir
ninja -C builddir

Compile ipmid with yocto defaults:

meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled
ninja -C builddir

If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects.

Enable/Disable meson wrap feature

meson builddir -Dwrap_mode=nofallback
ninja -C builddir

Enable debug traces

meson builddir -Dbuildtype=debug
ninja -C builddir

Generate test coverage report:

meson builddir -Db_coverage=true -Dtests=enabled
ninja -C builddir test
ninja -C builddir coverage