commit | cbfa6e1d2bb51f5c38d03a220c79653a0f569e9a | [log] [tgz] |
---|---|---|
author | Johnathan Mantey <johnathanx.mantey@intel.com> | Thu Jun 01 06:57:25 2023 -0700 |
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | Fri Jun 16 18:22:40 2023 +0000 |
tree | 98b79d2d5b67fafd572130c6f00f35e2516fa4da | |
parent | 49152e76b4c1eb28cef59de5591535387941eee0 [diff] |
Block creating IPv4 address 0.0.0.0 via Set LAN Configuration The IPMI Set LAN Configuration IP Address operation allows any 32-bit value to be sent to addressed NIC. The current OpenBMC behavior is to treat all values identically, and insert them into the systemd-networkd configuration file. This only allows IPMI to write new values, but to never have a way to remove an entry. Traditionally IPMI has used 0.0.0.0 to remove a static IP address entry from being applied to the NIC. This commit implements the ability to remove an active static IPv4 address by assigning 0.0.0.0 to the NIC. Preventing 0.0.0.0 from being written to the systemd-networkd configuration file also prevents systemd-networkd from creating one or more self assigned 192.x.x.x NAT style addresses. Tested: Manually inserted several 'Address=' entries containing valid IPv4 addresses. Rebooted the BMC to enable them. Issued 'ipmitool raw 12 1 1 3 0 0 0 0' and confirmed no 'Address=0.0.0.0' entry was added to the configuration file. Confirmed no self assigned NAT addresses were created. Confirmed one static IPv4 address entry was removed from the config file. Repeated 'ipmitool' requests removed one static address per request. Change-Id: I2ae94750b8f7b80d45b94651464477801064f991 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
meson builddir ninja -C builddir
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
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage