[U-Boot] [PATCH] net: link_local: Fix netmask endianness bug

From: Alexandre Messier amessier@tycoint.com
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 --- net/link_local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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)

On Tue, Mar 14, 2017 at 2:03 PM, Sylvain Lemieux slemieux.tyco@gmail.com wrote:
From: Alexandre Messier amessier@tycoint.com
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

Hi slemieux.tyco@gmail.com,
https://patchwork.ozlabs.org/patch/738893/ was applied to u-boot-net.git.
Thanks! -Joe
participants (3)
-
Joe Hershberger
-
Joe Hershberger
-
Sylvain Lemieux