[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [UNIKRAFT PATCH 1/1] Add in6addr_loopback
Hi Vlad,
This patch is looking good.
Bind9 uses the in6addr_loopback symbol. We add this
symbol in a separate c file, in6addr_loopback.c.
Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx>
---
Makefile.uk | 1 +
in6addr_loopback.c | 3 +++
include/netinet/in.h | 2 ++
3 files changed, 6 insertions(+)
create mode 100644 in6addr_loopback.c
diff --git a/Makefile.uk b/Makefile.uk
index d3c6c9c..be05dc5 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -128,6 +128,7 @@ LIBLWIP_SRCS-$(CONFIG_LWIP_SOCKET) += $(LIBLWIP_EXTRACTED)/api/sockets.c
LIBLWIP_SRCS-y += $(LIBLWIP_EXTRACTED)/netif/ethernet.c
LIBLWIP_SRCS-$(CONFIG_LWIP_UKNETDEV) += $(LIBLWIP_BASE)/netbuf.c|unikraft
LIBLWIP_SRCS-$(CONFIG_LWIP_UKNETDEV) += $(LIBLWIP_BASE)/uknetdev.c|unikraft
+LIBLWIP_SRCS-$(CONFIG_LWIP_IPV6) += $(LIBLWIP_BASE)/in6addr_loopback.c|unikraft
################################################################################
# IPv4
diff --git a/in6addr_loopback.c b/in6addr_loopback.c
new file mode 100644
index 0000000..b96005b
--- /dev/null
+++ b/in6addr_loopback.c
@@ -0,0 +1,3 @@
+#include <netinet/in.h>
+
+const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
diff --git a/include/netinet/in.h b/include/netinet/in.h
index 00d7fd4..aea7490 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -41,6 +41,8 @@ struct group_source_req {
#ifdef CONFIG_LWIP_IPV6
+extern const struct in6_addr in6addr_any, in6addr_loopback;
+
#define IPV6_ADDRFORM 1
#define IPV6_2292PKTINFO 2
#define IPV6_2292HOPOPTS 3
--
2.20.1
|