Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet6/ip6_fastfwd.c
Show First 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
{ | { | ||||
ip6->ip6_hlim -= IPV6_HLIMDEC; | ip6->ip6_hlim -= IPV6_HLIMDEC; | ||||
} | } | ||||
m_clrprotoflags(m); /* Avoid confusing lower layers. */ | m_clrprotoflags(m); /* Avoid confusing lower layers. */ | ||||
IP_PROBE(send, NULL, NULL, ip6, nh.nh_ifp, NULL, ip6); | IP_PROBE(send, NULL, NULL, ip6, nh.nh_ifp, NULL, ip6); | ||||
/* | |||||
* XXX: we need to use destination address with embedded scope | |||||
* zone id, because LLTABLE uses such form of addresses for lookup. | |||||
*/ | |||||
dst.sin6_addr = nh.nh_addr; | dst.sin6_addr = nh.nh_addr; | ||||
if (IN6_IS_SCOPE_LINKLOCAL(&dst.sin6_addr)) | |||||
dst.sin6_addr.s6_addr16[1] = htons(nh.nh_ifp->if_index & 0xffff); | |||||
error = (*nh.nh_ifp->if_output)(nh.nh_ifp, m, | error = (*nh.nh_ifp->if_output)(nh.nh_ifp, m, | ||||
(struct sockaddr *)&dst, NULL); | (struct sockaddr *)&dst, NULL); | ||||
if (error != 0) { | if (error != 0) { | ||||
in6_ifstat_inc(nh.nh_ifp, ifs6_out_discard); | in6_ifstat_inc(nh.nh_ifp, ifs6_out_discard); | ||||
IP6STAT_INC(ip6s_cantforward); | IP6STAT_INC(ip6s_cantforward); | ||||
} else { | } else { | ||||
in6_ifstat_inc(nh.nh_ifp, ifs6_out_forward); | in6_ifstat_inc(nh.nh_ifp, ifs6_out_forward); | ||||
IP6STAT_INC(ip6s_forward); | IP6STAT_INC(ip6s_forward); | ||||
Show All 13 Lines |