Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.164.2.3 retrieving revision 1.171 diff -u -p -r1.164.2.3 -r1.171 --- src/sys/netinet6/ip6_input.c 2017/01/07 08:56:51 1.164.2.3 +++ src/sys/netinet6/ip6_input.c 2016/12/08 05:16:34 1.171 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.164.2.3 2017/01/07 08:56:51 pgoyette Exp $ */ +/* $NetBSD: ip6_input.c,v 1.171 2016/12/08 05:16:34 ozaki-r Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.164.2.3 2017/01/07 08:56:51 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.171 2016/12/08 05:16:34 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -88,6 +88,7 @@ __KERNEL_RCSID(0, "$NetBSD: ip6_input.c, #include #include #include +#include #include #include @@ -144,6 +145,8 @@ pfil_head_t *inet6_pfil_hook; percpu_t *ip6stat_percpu; +percpu_t *ip6_forward_rt_percpu __cacheline_aligned; + static void ip6_init2(void); static void ip6intr(void *); static struct m_tag *ip6_setdstifaddr(struct mbuf *, const struct in6_ifaddr *); @@ -203,6 +206,10 @@ ip6_init(void) KASSERT(inet6_pfil_hook != NULL); ip6stat_percpu = percpu_alloc(sizeof(uint64_t) * IP6_NSTATS); + + ip6_forward_rt_percpu = percpu_alloc(sizeof(struct route)); + if (ip6_forward_rt_percpu == NULL) + panic("failed to alllocate ip6_forward_rt_percpu"); } static void @@ -252,8 +259,6 @@ ip6intr(void *arg __unused) #endif } -extern struct route ip6_forward_rt; - void ip6_input(struct mbuf *m, struct ifnet *rcvif) { @@ -269,6 +274,7 @@ ip6_input(struct mbuf *m, struct ifnet * struct sockaddr dst; struct sockaddr_in6 dst6; } u; + struct route *ro; /* * make sure we don't have onion peering information into m_tag. @@ -515,7 +521,7 @@ ip6_input(struct mbuf *m, struct ifnet * * packets to a tentative, duplicated, or somehow invalid * address must not be accepted. */ - if (!(ia6->ia6_flags & IN6_IFF_NOTREADY)) { + if (!(ia6->ia6_flags & (IN6_IFF_NOTREADY | IN6_IFF_DETACHED))) { /* this address is ready */ ours = 1; deliverifp = ia6->ia_ifp; /* correct? */