Fix IPv6 loopback driver that depended on the removed g_ipv6_allonesaddr. Noted by Masayuki Ishikawa

This commit is contained in:
Gregory Nutt
2017-08-09 06:59:55 -06:00
parent b5f5b07b18
commit 7bb8943a9c
3 changed files with 24 additions and 23 deletions
+13 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* net/loopback/lo_globals.c
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -49,19 +49,31 @@
* Public Data
****************************************************************************/
#ifdef CONFIG_LIBC_NETDB
/* Local loopback hostname */
const char g_lo_hostname[] = "localhost";
#endif
/* Local loopback addresses */
#ifdef CONFIG_NET_IPv4
const in_addr_t g_lo_ipv4addr = HTONL(0x7f000001);
const in_addr_t g_lo_ipv4mask = HTONL(0xff000000);
#endif
#ifdef CONFIG_NET_IPv6
const net_ipv6addr_t g_lo_ipv6addr =
{
HTONS(0), HTONS(0), HTONS(0), HTONS(0),
HTONS(0), HTONS(0), HTONS(0), HTONS(1)
};
const net_ipv6addr_t g_lo_ipv6mask =
{
HTONS(0xffff), HTONS(0xffff), HTONS(0xffff), HTONS(0xffff),
HTONS(0xffff), HTONS(0xffff), HTONS(0xffff), HTONS(0xffff)
};
#endif
/****************************************************************************
* Public Functions