From: Vlad-Andrei Badoiu Date: Thu, 14 May 2020 13:06:41 +0000 (+0300) Subject: Add in6addr_loopback X-Git-Tag: RELEASE-0.5~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=faa1ed75e9f85b6acdb5b96f88376f9dbcb98282;p=unikraft%2Flibs%2Flwip.git Add in6addr_loopback Bind9 uses the in6addr_loopback symbol. We add this symbol in a separate c file, in6addr_loopback.c. Signed-off-by: Vlad-Andrei Badoiu Reviewed-by: Alice Suiu --- diff --git a/Makefile.uk b/Makefile.uk index 99005a9..83e09b3 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -129,6 +129,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 + +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