Treat link-local addresses as static when link
local autoconfig is disabled.
Although a link-local IP can be set via ipmitool (e.g.,
`ipmitool lan set 1 ipaddr 169.254.x.x`), it cannot be read back:
`ipmitool lan print 1` reports "IP Address : 0.0.0.0". That's because
phosphor-host-ipmid only considers static and DHCP addresses:
https://github.com/openbmc/phosphor-host-ipmid/blob/master/transporthandler.cpp#L52
Treating a link-local IP as static when autoconfiguration is disabled
allows it to be reported back by "ipmitool lan print".
TESTED: Built with `default-link-local-autoconf=false`. Set a link-local
ip via `ipmitool lan set 1 ipaddr` and verified it is correctly reported
back via `ipmitool lan print 1`.
Signed-off-by: Ali El-Haj-Mahmoud <aaelhaj@google.com>
Change-Id: I4f9871095b8b99dd7e7957babda39d89c5856be2
1 file changed