diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index e7c81d67e936..e6bc60c8a6bf 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -110,9 +110,6 @@ MALLOC_DEFINE(M_CACHE, "cache", "Various Dynamically allocated caches"); MALLOC_DEFINE(M_DEVBUF, "devbuf", "device driver memory"); MALLOC_DEFINE(M_TEMP, "temp", "misc temporary data buffers"); -MALLOC_DEFINE(M_IP6OPT, "ip6opt", "IPv6 options"); -MALLOC_DEFINE(M_IP6NDP, "ip6ndp", "IPv6 Neighbor Discovery"); - static struct malloc_type *kmemstatistics; static int kmemcount; diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 1f780bd6a536..ad905b9972f7 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -135,6 +135,8 @@ struct ip6_exthdrs { struct mbuf *ip6e_dest2; }; +static MALLOC_DEFINE(M_IP6OPT, "ip6opt", "IPv6 options"); + static int ip6_pcbopt(int, u_char *, int, struct ip6_pktopts **, struct ucred *, int); static int ip6_pcbopts(struct ip6_pktopts **, struct mbuf *, diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index d18ebd85f391..f71cd6a004df 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -85,6 +85,8 @@ __FBSDID("$FreeBSD$"); #define SIN6(s) ((const struct sockaddr_in6 *)(s)) +MALLOC_DEFINE(M_IP6NDP, "ip6ndp", "IPv6 Neighbor Discovery"); + /* timer values */ VNET_DEFINE(int, nd6_prune) = 1; /* walk list every 1 seconds */ VNET_DEFINE(int, nd6_delay) = 5; /* delay first probe time 5 second */ diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 3b1aa96e70b1..0978f0d2e966 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -316,6 +316,10 @@ struct nd_pfxrouter { LIST_HEAD(nd_prhead, nd_prefix); +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_IP6NDP); +#endif + /* nd6.c */ VNET_DECLARE(int, nd6_prune); VNET_DECLARE(int, nd6_delay); diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index c09d74996bb4..b53066399d3b 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -146,9 +146,6 @@ MALLOC_DECLARE(M_CACHE); MALLOC_DECLARE(M_DEVBUF); MALLOC_DECLARE(M_TEMP); -MALLOC_DECLARE(M_IP6OPT); /* for INET6 */ -MALLOC_DECLARE(M_IP6NDP); /* for INET6 */ - /* * Deprecated macro versions of not-quite-malloc() and free(). */