mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 11:24:42 +00:00
net: Fix endianness bug in link-local
The ip is stored in network order, so we can't test it in host order. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Kim Phillips <kim.phillips@freescale.com>
This commit is contained in:
parent
85b1980273
commit
65b0db831e
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ static void configure_wait(void)
|
||||||
void link_local_start(void)
|
void link_local_start(void)
|
||||||
{
|
{
|
||||||
ip = getenv_IPaddr("llipaddr");
|
ip = getenv_IPaddr("llipaddr");
|
||||||
if (ip != 0 && (ip & IN_CLASSB_NET) != LINKLOCAL_ADDR) {
|
if (ip != 0 && (ntohl(ip) & IN_CLASSB_NET) != LINKLOCAL_ADDR) {
|
||||||
puts("invalid link address");
|
puts("invalid link address");
|
||||||
net_set_state(NETLOOP_FAIL);
|
net_set_state(NETLOOP_FAIL);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue