diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-05-23 13:39:56 -0500 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-05-23 13:39:56 -0500 |
commit | f448388bb29525075f374464ec8c4c04e9bf03f6 (patch) | |
tree | b51e7d59eebc90d5c3d9578d1a98bb2e58265dfd /sys/netinet6 | |
parent | 57a447a9c3cb69fb2e4f874104327cdc3203313a (diff) | |
parent | 62dc16af9990c7ed2d0ad80da282ec71427e8556 (diff) | |
download | FreeBSD-src-f448388bb29525075f374464ec8c4c04e9bf03f6.zip FreeBSD-src-f448388bb29525075f374464ec8c4c04e9bf03f6.tar.gz |
Merge remote-tracking branch 'origin/master' into devel-11
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_output.c | 14 | ||||
-rw-r--r-- | sys/netinet6/nd6.c | 2 | ||||
-rw-r--r-- | sys/netinet6/nd6.h | 4 |
3 files changed, 9 insertions, 11 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 1f780bd6..9017de7 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 *, @@ -323,12 +325,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct m_tag *fwd_tag = NULL; uint32_t id; - ip6 = mtod(m, struct ip6_hdr *); - if (ip6 == NULL) { - printf ("ip6 is NULL"); - goto bad; - } - if (inp != NULL) { M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { @@ -410,7 +406,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, hdrsplit++; } - /* adjust pointer */ ip6 = mtod(m, struct ip6_hdr *); /* adjust mbuf packet header length */ @@ -541,10 +536,6 @@ again: else ip6->ip6_hlim = V_ip6_defmcasthlim; } - - /* adjust pointer */ - ip6 = mtod(m, struct ip6_hdr *); - /* * Validate route against routing table additions; * a better/more specific route might have been added. @@ -803,6 +794,7 @@ again: error = pfil_run_hooks(&V_inet6_pfil_hook, &m, ifp, PFIL_OUT, inp); if (error != 0 || m == NULL) goto done; + /* adjust pointer */ ip6 = mtod(m, struct ip6_hdr *); needfiblookup = 0; diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index d18ebd8..f71cd6a 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 3b1aa96..0978f0d 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); |