[U-Boot] Setting ipaddr via setenv() - H_INTERACTIVE vs H_PROGRAMMATIC

Stefan Roese sr at denx.de
Tue Mar 1 11:35:50 CET 2016


Hi Joe,

I'm currently stumbling over a problem in some board specific code
(not in mainline yet), that sets the "ipaddr" env variable via
setenv(). But as I now noticed, the callback on_ipaddr() doesn't
set net_ip to this new value. As flags has H_PROGRAMMATIC set and
op_ipaddr() skips setting this value in this case.

I fail to see why we need this check in on_ipaddr(). Could you
please explain why this is needed? Why would someone use setenv()
for the "ipaddr" and not want to also update the net_ip value.
This results in the "ipaddr" value being updated but net_ip
still being configured to the old value.

Or if this is really needed, what is the correct way to update
the ipaddr (env variable and net_ip value) from the U-Boot code?

Thanks,
Stefan


More information about the U-Boot mailing list