version 1.164.2.3, 2017/01/07 08:56:51 |
version 1.164.2.4, 2017/03/20 06:57:51 |
Line 75 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 75 __KERNEL_RCSID(0, "$NetBSD$"); |
|
|
|
#include <sys/param.h> |
#include <sys/param.h> |
#include <sys/systm.h> |
#include <sys/systm.h> |
#include <sys/malloc.h> |
|
#include <sys/mbuf.h> |
#include <sys/mbuf.h> |
#include <sys/domain.h> |
#include <sys/domain.h> |
#include <sys/protosw.h> |
#include <sys/protosw.h> |
Line 453 ip6_input(struct mbuf *m, struct ifnet * |
|
Line 452 ip6_input(struct mbuf *m, struct ifnet * |
|
* Multicast check |
* Multicast check |
*/ |
*/ |
if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { |
if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { |
struct in6_multi *in6m = 0; |
bool ingroup; |
|
|
in6_ifstat_inc(rcvif, ifs6_in_mcast); |
in6_ifstat_inc(rcvif, ifs6_in_mcast); |
/* |
/* |
* See if we belong to the destination multicast group on the |
* See if we belong to the destination multicast group on the |
* arrival interface. |
* arrival interface. |
*/ |
*/ |
IN6_LOOKUP_MULTI(ip6->ip6_dst, rcvif, in6m); |
ingroup = in6_multi_group(&ip6->ip6_dst, rcvif); |
if (in6m) |
if (ingroup) |
ours = 1; |
ours = 1; |
else if (!ip6_mrouter) { |
else if (!ip6_mrouter) { |
uint64_t *ip6s = IP6_STAT_GETREF(); |
uint64_t *ip6s = IP6_STAT_GETREF(); |
Line 522 ip6_input(struct mbuf *m, struct ifnet * |
|
Line 521 ip6_input(struct mbuf *m, struct ifnet * |
|
goto hbhcheck; |
goto hbhcheck; |
} else { |
} else { |
/* address is not ready, so discard the packet. */ |
/* address is not ready, so discard the packet. */ |
|
char ip6bufs[INET6_ADDRSTRLEN]; |
|
char ip6bufd[INET6_ADDRSTRLEN]; |
nd6log(LOG_INFO, "packet to an unready address %s->%s\n", |
nd6log(LOG_INFO, "packet to an unready address %s->%s\n", |
ip6_sprintf(&ip6->ip6_src), |
IN6_PRINT(ip6bufs, &ip6->ip6_src), |
ip6_sprintf(&ip6->ip6_dst)); |
IN6_PRINT(ip6bufd, &ip6->ip6_dst)); |
|
|
goto bad_unref; |
goto bad_unref; |
} |
} |
Line 1315 ip6_notify_pmtu(struct in6pcb *in6p, con |
|
Line 1316 ip6_notify_pmtu(struct in6pcb *in6p, con |
|
if (mtu == NULL) |
if (mtu == NULL) |
return; |
return; |
|
|
#ifdef DIAGNOSTIC |
KASSERT(so != NULL); |
if (so == NULL) /* I believe this is impossible */ |
|
panic("ip6_notify_pmtu: socket is NULL"); |
|
#endif |
|
|
|
memset(&mtuctl, 0, sizeof(mtuctl)); /* zero-clear for safety */ |
memset(&mtuctl, 0, sizeof(mtuctl)); /* zero-clear for safety */ |
mtuctl.ip6m_mtu = *mtu; |
mtuctl.ip6m_mtu = *mtu; |