diff options
author | Alexandre Messier <amessier@tycoint.com> | 2017-03-14 15:03:31 -0400 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2017-03-26 09:58:19 -0500 |
commit | 27a0f038a7f8c999fbffa8b26b16b24dc846e1cf (patch) | |
tree | 37c58475b9d84391474969e56b77565c5847b7d2 /net | |
parent | 5c624b9e9ccfbc8640e815202da3511aca4e449e (diff) | |
download | u-boot-27a0f038a7f8c999fbffa8b26b16b24dc846e1cf.tar.gz u-boot-27a0f038a7f8c999fbffa8b26b16b24dc846e1cf.tar.xz u-boot-27a0f038a7f8c999fbffa8b26b16b24dc846e1cf.zip |
net: link_local: Fix netmask endianness bug
The network mask must be stored in network order when in a
'struct in_addr'.
This fix removes the "gatewayip needed but not set" message on the
console when using a link-local IP setup.
Signed-off-by: Alexandre Messier <amessier@tycoint.com>
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/link_local.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/link_local.c b/net/link_local.c index 27851b6b81..dfd240dfbc 100644 --- a/net/link_local.c +++ b/net/link_local.c @@ -111,7 +111,7 @@ void link_local_start(void) net_set_state(NETLOOP_FAIL); return; } - net_netmask.s_addr = IN_CLASSB_NET; + net_netmask.s_addr = htonl(IN_CLASSB_NET); seed = seed_mac(); if (ip.s_addr == 0) |