Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet6/frag6.c
Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | #endif | ||||
IP6STAT_INC(ip6s_fragments); | IP6STAT_INC(ip6s_fragments); | ||||
in6_ifstat_inc(dstifp, ifs6_reass_reqd); | in6_ifstat_inc(dstifp, ifs6_reass_reqd); | ||||
/* offset now points to data portion */ | /* offset now points to data portion */ | ||||
offset += sizeof(struct ip6_frag); | offset += sizeof(struct ip6_frag); | ||||
/* | /* | ||||
* RFC 6946: Handle "atomic" fragments (offset and m bit set to 0) | * Handle "atomic" fragments (offset and m bit set to 0) upfront, | ||||
* upfront, unrelated to any reassembly. Just skip the fragment header. | * unrelated to any reassembly (see RFC 6946 and section 4.5 of RFC | ||||
* 8200). Just skip the fragment header. | |||||
*/ | */ | ||||
if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { | if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { | ||||
/* XXX-BZ we want dedicated counters for this. */ | IP6STAT_INC(ip6s_atomicfrags); | ||||
IP6STAT_INC(ip6s_reassembled); | |||||
in6_ifstat_inc(dstifp, ifs6_reass_ok); | in6_ifstat_inc(dstifp, ifs6_reass_ok); | ||||
*offp = offset; | *offp = offset; | ||||
m->m_flags |= M_FRAGMENTED; | m->m_flags |= M_FRAGMENTED; | ||||
return (ip6f->ip6f_nxt); | return (ip6f->ip6f_nxt); | ||||
} | } | ||||
/* Get fragment length and discard 0-byte fragments. */ | /* Get fragment length and discard 0-byte fragments. */ | ||||
frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset; | frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset; | ||||
▲ Show 20 Lines • Show All 673 Lines • Show Last 20 Lines |