Skip to content
Snippets Groups Projects
Commit 65b0db83 authored by Joe Hershberger's avatar Joe Hershberger
Browse files

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: default avatarJoe Hershberger <joe.hershberger@ni.com>
Reviewed-by: default avatarKim Phillips <kim.phillips@freescale.com>
parent 85b19802
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ static void configure_wait(void) ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment