mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Fix IPv6 loopback driver that depended on the removed g_ipv6_allonesaddr. Noted by Masayuki Ishikawa
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user