summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-11-05 06:13:45 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-12-15 12:28:23 -0600
commit65b0db831e7b179879968d860fd5caa907cf6565 (patch)
treefcb31685a8fa65895814469d904f464480da49f8 /net
parent85b1980273084c844c911c14f70cc11f27fd25ab (diff)
downloadu-boot-imx-65b0db831e7b179879968d860fd5caa907cf6565.zip
u-boot-imx-65b0db831e7b179879968d860fd5caa907cf6565.tar.gz
u-boot-imx-65b0db831e7b179879968d860fd5caa907cf6565.tar.bz2
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>
Diffstat (limited to 'net')
-rw-r--r--net/link_local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/link_local.c b/net/link_local.c
index d52f13a..1ba796e 100644
--- a/net/link_local.c
+++ b/net/link_local.c
@@ -103,7 +103,7 @@ static void configure_wait(void)
void link_local_start(void)
{
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");
net_set_state(NETLOOP_FAIL);
return;