2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the project nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * $KAME: frag6.c,v 1.33 2002/01/07 11:34:48 kjc Exp $
32 #include <sys/cdefs.h>
33 __FBSDID("$FreeBSD$");
37 #include <sys/param.h>
38 #include <sys/systm.h>
39 #include <sys/malloc.h>
41 #include <sys/domain.h>
42 #include <sys/protosw.h>
43 #include <sys/socket.h>
44 #include <sys/errno.h>
46 #include <sys/kernel.h>
47 #include <sys/syslog.h>
50 #include <net/if_var.h>
51 #include <net/netisr.h>
52 #include <net/route.h>
55 #include <netinet/in.h>
56 #include <netinet/in_var.h>
57 #include <netinet/ip6.h>
58 #include <netinet6/ip6_var.h>
59 #include <netinet/icmp6.h>
60 #include <netinet/in_systm.h> /* for ECN definitions */
61 #include <netinet/ip.h> /* for ECN definitions */
63 #include <security/mac/mac_framework.h>
65 static void frag6_enq(struct ip6asfrag *, struct ip6asfrag *);
66 static void frag6_deq(struct ip6asfrag *);
67 static void frag6_insque(struct ip6q *, struct ip6q *);
68 static void frag6_remque(struct ip6q *);
69 static void frag6_freef(struct ip6q *);
71 static struct mtx ip6qlock;
73 * These fields all protected by ip6qlock.
75 static VNET_DEFINE(u_int, frag6_nfragpackets);
76 static VNET_DEFINE(u_int, frag6_nfrags);
77 static VNET_DEFINE(struct ip6q, ip6q); /* ip6 reassemble queue */
79 #define V_frag6_nfragpackets VNET(frag6_nfragpackets)
80 #define V_frag6_nfrags VNET(frag6_nfrags)
81 #define V_ip6q VNET(ip6q)
83 #define IP6Q_LOCK_INIT() mtx_init(&ip6qlock, "ip6qlock", NULL, MTX_DEF);
84 #define IP6Q_LOCK() mtx_lock(&ip6qlock)
85 #define IP6Q_TRYLOCK() mtx_trylock(&ip6qlock)
86 #define IP6Q_LOCK_ASSERT() mtx_assert(&ip6qlock, MA_OWNED)
87 #define IP6Q_UNLOCK() mtx_unlock(&ip6qlock)
89 static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment reassembly header");
92 * Initialise reassembly queue and fragment identifier.
95 frag6_change(void *tag)
98 V_ip6_maxfragpackets = nmbclusters / 4;
99 V_ip6_maxfrags = nmbclusters / 4;
106 V_ip6_maxfragpackets = nmbclusters / 4;
107 V_ip6_maxfrags = nmbclusters / 4;
108 V_ip6q.ip6q_next = V_ip6q.ip6q_prev = &V_ip6q;
110 if (!IS_DEFAULT_VNET(curvnet))
113 EVENTHANDLER_REGISTER(nmbclusters_change,
114 frag6_change, NULL, EVENTHANDLER_PRI_ANY);
120 * In RFC2460, fragment and reassembly rule do not agree with each other,
121 * in terms of next header field handling in fragment header.
122 * While the sender will use the same value for all of the fragmented packets,
123 * receiver is suggested not to check the consistency.
125 * fragment rule (p20):
126 * (2) A Fragment header containing:
127 * The Next Header value that identifies the first header of
128 * the Fragmentable Part of the original packet.
129 * -> next header field is same for all fragments
131 * reassembly rule (p21):
132 * The Next Header field of the last header of the Unfragmentable
133 * Part is obtained from the Next Header field of the first
134 * fragment's Fragment header.
135 * -> should grab it from the first fragment only
137 * The following note also contradicts with fragment rule - noone is going to
138 * send different fragment with different next header field.
140 * additional note (p22):
141 * The Next Header values in the Fragment headers of different
142 * fragments of the same original packet may differ. Only the value
143 * from the Offset zero fragment packet is used for reassembly.
144 * -> should grab it from the first fragment only
146 * There is no explicit reason given in the RFC. Historical reason maybe?
152 frag6_input(struct mbuf **mp, int *offp, int proto)
154 struct mbuf *m = *mp, *t;
156 struct ip6_frag *ip6f;
158 struct ip6asfrag *af6, *ip6af, *af6dwn;
159 struct in6_ifaddr *ia;
160 int offset = *offp, nxt, i, next;
162 int fragoff, frgpartlen; /* must be larger than u_int16_t */
163 struct ifnet *dstifp;
167 struct ip6_direct_ctx *ip6dc;
171 char ip6buf[INET6_ADDRSTRLEN];
174 ip6 = mtod(m, struct ip6_hdr *);
175 #ifndef PULLDOWN_TEST
176 IP6_EXTHDR_CHECK(m, offset, sizeof(struct ip6_frag), IPPROTO_DONE);
177 ip6f = (struct ip6_frag *)((caddr_t)ip6 + offset);
179 IP6_EXTHDR_GET(ip6f, struct ip6_frag *, m, offset, sizeof(*ip6f));
181 return (IPPROTO_DONE);
185 /* find the destination interface of the packet. */
186 ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */);
189 ifa_free(&ia->ia_ifa);
191 /* jumbo payload can't contain a fragment header */
192 if (ip6->ip6_plen == 0) {
193 icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset);
194 in6_ifstat_inc(dstifp, ifs6_reass_fail);
199 * check whether fragment packet's fragment length is
200 * multiple of 8 octets.
201 * sizeof(struct ip6_frag) == 8
202 * sizeof(struct ip6_hdr) = 40
204 if ((ip6f->ip6f_offlg & IP6F_MORE_FRAG) &&
205 (((ntohs(ip6->ip6_plen) - offset) & 0x7) != 0)) {
206 icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
207 offsetof(struct ip6_hdr, ip6_plen));
208 in6_ifstat_inc(dstifp, ifs6_reass_fail);
212 IP6STAT_INC(ip6s_fragments);
213 in6_ifstat_inc(dstifp, ifs6_reass_reqd);
215 /* offset now points to data portion */
216 offset += sizeof(struct ip6_frag);
219 * RFC 6946: Handle "atomic" fragments (offset and m bit set to 0)
220 * upfront, unrelated to any reassembly. Just skip the fragment header.
222 if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) {
223 /* XXX-BZ we want dedicated counters for this. */
224 IP6STAT_INC(ip6s_reassembled);
225 in6_ifstat_inc(dstifp, ifs6_reass_ok);
227 return (ip6f->ip6f_nxt);
233 * Enforce upper bound on number of fragments.
234 * If maxfrag is 0, never accept fragments.
235 * If maxfrag is -1, accept all fragments without limitation.
237 if (V_ip6_maxfrags < 0)
239 else if (V_frag6_nfrags >= (u_int)V_ip6_maxfrags)
242 for (q6 = V_ip6q.ip6q_next; q6 != &V_ip6q; q6 = q6->ip6q_next)
243 if (ip6f->ip6f_ident == q6->ip6q_ident &&
244 IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &q6->ip6q_src) &&
245 IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &q6->ip6q_dst)
247 && mac_ip6q_match(m, q6)
254 * the first fragment to arrive, create a reassembly queue.
259 * Enforce upper bound on number of fragmented packets
260 * for which we attempt reassembly;
261 * If maxfragpackets is 0, never accept fragments.
262 * If maxfragpackets is -1, accept all fragments without
265 if (V_ip6_maxfragpackets < 0)
267 else if (V_frag6_nfragpackets >= (u_int)V_ip6_maxfragpackets)
269 V_frag6_nfragpackets++;
270 q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FTABLE,
274 bzero(q6, sizeof(*q6));
276 if (mac_ip6q_init(q6, M_NOWAIT) != 0) {
280 mac_ip6q_create(m, q6);
282 frag6_insque(q6, &V_ip6q);
284 /* ip6q_nxt will be filled afterwards, from 1st fragment */
285 q6->ip6q_down = q6->ip6q_up = (struct ip6asfrag *)q6;
287 q6->ip6q_nxtp = (u_char *)nxtp;
289 q6->ip6q_ident = ip6f->ip6f_ident;
290 q6->ip6q_ttl = IPV6_FRAGTTL;
291 q6->ip6q_src = ip6->ip6_src;
292 q6->ip6q_dst = ip6->ip6_dst;
294 (ntohl(ip6->ip6_flow) >> 20) & IPTOS_ECN_MASK;
295 q6->ip6q_unfrglen = -1; /* The 1st fragment has not arrived. */
301 * If it's the 1st fragment, record the length of the
302 * unfragmentable part and the next header of the fragment header.
304 fragoff = ntohs(ip6f->ip6f_offlg & IP6F_OFF_MASK);
306 q6->ip6q_unfrglen = offset - sizeof(struct ip6_hdr) -
307 sizeof(struct ip6_frag);
308 q6->ip6q_nxt = ip6f->ip6f_nxt;
312 * Check that the reassembled packet would not exceed 65535 bytes
314 * If it would exceed, discard the fragment and return an ICMP error.
316 frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset;
317 if (q6->ip6q_unfrglen >= 0) {
318 /* The 1st fragment has already arrived. */
319 if (q6->ip6q_unfrglen + fragoff + frgpartlen > IPV6_MAXPACKET) {
320 icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
321 offset - sizeof(struct ip6_frag) +
322 offsetof(struct ip6_frag, ip6f_offlg));
324 return (IPPROTO_DONE);
326 } else if (fragoff + frgpartlen > IPV6_MAXPACKET) {
327 icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
328 offset - sizeof(struct ip6_frag) +
329 offsetof(struct ip6_frag, ip6f_offlg));
331 return (IPPROTO_DONE);
334 * If it's the first fragment, do the above check for each
335 * fragment already stored in the reassembly queue.
338 for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6;
340 af6dwn = af6->ip6af_down;
342 if (q6->ip6q_unfrglen + af6->ip6af_off + af6->ip6af_frglen >
344 struct mbuf *merr = IP6_REASS_MBUF(af6);
345 struct ip6_hdr *ip6err;
346 int erroff = af6->ip6af_offset;
348 /* dequeue the fragment. */
352 /* adjust pointer. */
353 ip6err = mtod(merr, struct ip6_hdr *);
356 * Restore source and destination addresses
357 * in the erroneous IPv6 header.
359 ip6err->ip6_src = q6->ip6q_src;
360 ip6err->ip6_dst = q6->ip6q_dst;
362 icmp6_error(merr, ICMP6_PARAM_PROB,
363 ICMP6_PARAMPROB_HEADER,
364 erroff - sizeof(struct ip6_frag) +
365 offsetof(struct ip6_frag, ip6f_offlg));
370 ip6af = (struct ip6asfrag *)malloc(sizeof(struct ip6asfrag), M_FTABLE,
374 bzero(ip6af, sizeof(*ip6af));
375 ip6af->ip6af_mff = ip6f->ip6f_offlg & IP6F_MORE_FRAG;
376 ip6af->ip6af_off = fragoff;
377 ip6af->ip6af_frglen = frgpartlen;
378 ip6af->ip6af_offset = offset;
379 IP6_REASS_MBUF(ip6af) = m;
382 af6 = (struct ip6asfrag *)q6;
387 * Handle ECN by comparing this segment with the first one;
388 * if CE is set, do not lose CE.
389 * drop if CE and not-ECT are mixed for the same packet.
391 ecn = (ntohl(ip6->ip6_flow) >> 20) & IPTOS_ECN_MASK;
393 if (ecn == IPTOS_ECN_CE) {
394 if (ecn0 == IPTOS_ECN_NOTECT) {
395 free(ip6af, M_FTABLE);
398 if (ecn0 != IPTOS_ECN_CE)
399 q6->ip6q_ecn = IPTOS_ECN_CE;
401 if (ecn == IPTOS_ECN_NOTECT && ecn0 != IPTOS_ECN_NOTECT) {
402 free(ip6af, M_FTABLE);
407 * Find a segment which begins after this one does.
409 for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6;
410 af6 = af6->ip6af_down)
411 if (af6->ip6af_off > ip6af->ip6af_off)
416 * If there is a preceding segment, it may provide some of
417 * our data already. If so, drop the data from the incoming
418 * segment. If it provides all of our data, drop us.
420 if (af6->ip6af_up != (struct ip6asfrag *)q6) {
421 i = af6->ip6af_up->ip6af_off + af6->ip6af_up->ip6af_frglen
424 if (i >= ip6af->ip6af_frglen)
426 m_adj(IP6_REASS_MBUF(ip6af), i);
427 ip6af->ip6af_off += i;
428 ip6af->ip6af_frglen -= i;
433 * While we overlap succeeding segments trim them or,
434 * if they are completely covered, dequeue them.
436 while (af6 != (struct ip6asfrag *)q6 &&
437 ip6af->ip6af_off + ip6af->ip6af_frglen > af6->ip6af_off) {
438 i = (ip6af->ip6af_off + ip6af->ip6af_frglen) - af6->ip6af_off;
439 if (i < af6->ip6af_frglen) {
440 af6->ip6af_frglen -= i;
442 m_adj(IP6_REASS_MBUF(af6), i);
445 af6 = af6->ip6af_down;
446 m_freem(IP6_REASS_MBUF(af6->ip6af_up));
447 frag6_deq(af6->ip6af_up);
451 * If the incoming framgent overlaps some existing fragments in
452 * the reassembly queue, drop it, since it is dangerous to override
453 * existing fragments from a security point of view.
454 * We don't know which fragment is the bad guy - here we trust
455 * fragment that came in earlier, with no real reason.
457 * Note: due to changes after disabling this part, mbuf passed to
458 * m_adj() below now does not meet the requirement.
460 if (af6->ip6af_up != (struct ip6asfrag *)q6) {
461 i = af6->ip6af_up->ip6af_off + af6->ip6af_up->ip6af_frglen
464 #if 0 /* suppress the noisy log */
465 log(LOG_ERR, "%d bytes of a fragment from %s "
466 "overlaps the previous fragment\n",
467 i, ip6_sprintf(ip6buf, &q6->ip6q_src));
469 free(ip6af, M_FTABLE);
473 if (af6 != (struct ip6asfrag *)q6) {
474 i = (ip6af->ip6af_off + ip6af->ip6af_frglen) - af6->ip6af_off;
476 #if 0 /* suppress the noisy log */
477 log(LOG_ERR, "%d bytes of a fragment from %s "
478 "overlaps the succeeding fragment",
479 i, ip6_sprintf(ip6buf, &q6->ip6q_src));
481 free(ip6af, M_FTABLE);
490 mac_ip6q_update(m, q6);
494 * Stick new segment in its place;
495 * check for complete reassembly.
496 * Move to front of packet queue, as we are
497 * the most recently active fragmented packet.
499 frag6_enq(ip6af, af6->ip6af_up);
503 if (q6 != V_ip6q.ip6q_next) {
505 frag6_insque(q6, &V_ip6q);
509 for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6;
510 af6 = af6->ip6af_down) {
511 if (af6->ip6af_off != next) {
515 next += af6->ip6af_frglen;
517 if (af6->ip6af_up->ip6af_mff) {
523 * Reassembly is complete; concatenate fragments.
525 ip6af = q6->ip6q_down;
526 t = m = IP6_REASS_MBUF(ip6af);
527 af6 = ip6af->ip6af_down;
529 while (af6 != (struct ip6asfrag *)q6) {
530 af6dwn = af6->ip6af_down;
534 m_adj(IP6_REASS_MBUF(af6), af6->ip6af_offset);
535 m_cat(t, IP6_REASS_MBUF(af6));
540 /* adjust offset to point where the original next header starts */
541 offset = ip6af->ip6af_offset - sizeof(struct ip6_frag);
542 free(ip6af, M_FTABLE);
543 ip6 = mtod(m, struct ip6_hdr *);
544 ip6->ip6_plen = htons((u_short)next + offset - sizeof(struct ip6_hdr));
545 if (q6->ip6q_ecn == IPTOS_ECN_CE)
546 ip6->ip6_flow |= htonl(IPTOS_ECN_CE << 20);
549 *q6->ip6q_nxtp = (u_char)(nxt & 0xff);
552 if (ip6_deletefraghdr(m, offset, M_NOWAIT) != 0) {
554 V_frag6_nfrags -= q6->ip6q_nfrag;
556 mac_ip6q_destroy(q6);
559 V_frag6_nfragpackets--;
565 * Store NXT to the original.
568 char *prvnxtp = ip6_get_prevhdr(m, offset); /* XXX */
573 V_frag6_nfrags -= q6->ip6q_nfrag;
575 mac_ip6q_reassemble(q6, m);
576 mac_ip6q_destroy(q6);
579 V_frag6_nfragpackets--;
581 if (m->m_flags & M_PKTHDR) { /* Isn't it always true? */
583 for (t = m; t; t = t->m_next)
585 m->m_pkthdr.len = plen;
589 mtag = m_tag_alloc(MTAG_ABI_IPV6, IPV6_TAG_DIRECT, sizeof(*ip6dc),
594 ip6dc = (struct ip6_direct_ctx *)(mtag + 1);
595 ip6dc->ip6dc_nxt = nxt;
596 ip6dc->ip6dc_off = offset;
598 m_tag_prepend(m, mtag);
602 IP6STAT_INC(ip6s_reassembled);
603 in6_ifstat_inc(dstifp, ifs6_reass_ok);
607 * Queue/dispatch for reprocessing.
609 netisr_dispatch(NETISR_IPV6_DIRECT, m);
614 * Tell launch routine the next header
624 in6_ifstat_inc(dstifp, ifs6_reass_fail);
625 IP6STAT_INC(ip6s_fragdropped);
631 * Free a fragment reassembly header and all
632 * associated datagrams.
635 frag6_freef(struct ip6q *q6)
637 struct ip6asfrag *af6, *down6;
641 for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6;
643 struct mbuf *m = IP6_REASS_MBUF(af6);
645 down6 = af6->ip6af_down;
649 * Return ICMP time exceeded error for the 1st fragment.
650 * Just free other fragments.
652 if (af6->ip6af_off == 0) {
656 ip6 = mtod(m, struct ip6_hdr *);
658 /* restore source and destination addresses */
659 ip6->ip6_src = q6->ip6q_src;
660 ip6->ip6_dst = q6->ip6q_dst;
662 icmp6_error(m, ICMP6_TIME_EXCEEDED,
663 ICMP6_TIME_EXCEED_REASSEMBLY, 0);
669 V_frag6_nfrags -= q6->ip6q_nfrag;
671 mac_ip6q_destroy(q6);
674 V_frag6_nfragpackets--;
678 * Put an ip fragment on a reassembly chain.
679 * Like insque, but pointers in middle of structure.
682 frag6_enq(struct ip6asfrag *af6, struct ip6asfrag *up6)
688 af6->ip6af_down = up6->ip6af_down;
689 up6->ip6af_down->ip6af_up = af6;
690 up6->ip6af_down = af6;
694 * To frag6_enq as remque is to insque.
697 frag6_deq(struct ip6asfrag *af6)
702 af6->ip6af_up->ip6af_down = af6->ip6af_down;
703 af6->ip6af_down->ip6af_up = af6->ip6af_up;
707 frag6_insque(struct ip6q *new, struct ip6q *old)
712 new->ip6q_prev = old;
713 new->ip6q_next = old->ip6q_next;
714 old->ip6q_next->ip6q_prev= new;
715 old->ip6q_next = new;
719 frag6_remque(struct ip6q *p6)
724 p6->ip6q_prev->ip6q_next = p6->ip6q_next;
725 p6->ip6q_next->ip6q_prev = p6->ip6q_prev;
729 * IPv6 reassembling timer processing;
730 * if a timer expires on a reassembly
736 VNET_ITERATOR_DECL(vnet_iter);
739 VNET_LIST_RLOCK_NOSLEEP();
741 VNET_FOREACH(vnet_iter) {
742 CURVNET_SET(vnet_iter);
743 q6 = V_ip6q.ip6q_next;
745 while (q6 != &V_ip6q) {
748 if (q6->ip6q_prev->ip6q_ttl == 0) {
749 IP6STAT_INC(ip6s_fragtimeout);
750 /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */
751 frag6_freef(q6->ip6q_prev);
755 * If we are over the maximum number of fragments
756 * (due to the limit being lowered), drain off
757 * enough to get down to the new limit.
759 while (V_frag6_nfragpackets > (u_int)V_ip6_maxfragpackets &&
761 IP6STAT_INC(ip6s_fragoverflow);
762 /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */
763 frag6_freef(V_ip6q.ip6q_prev);
768 VNET_LIST_RUNLOCK_NOSLEEP();
772 * Drain off all datagram fragments.
777 VNET_ITERATOR_DECL(vnet_iter);
779 VNET_LIST_RLOCK_NOSLEEP();
780 if (IP6Q_TRYLOCK() == 0) {
781 VNET_LIST_RUNLOCK_NOSLEEP();
784 VNET_FOREACH(vnet_iter) {
785 CURVNET_SET(vnet_iter);
786 while (V_ip6q.ip6q_next != &V_ip6q) {
787 IP6STAT_INC(ip6s_fragdropped);
788 /* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */
789 frag6_freef(V_ip6q.ip6q_next);
794 VNET_LIST_RUNLOCK_NOSLEEP();
798 ip6_deletefraghdr(struct mbuf *m, int offset, int wait)
800 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
803 /* Delete frag6 header. */
804 if (m->m_len >= offset + sizeof(struct ip6_frag)) {
805 /* This is the only possible case with !PULLDOWN_TEST. */
806 bcopy(ip6, (char *)ip6 + sizeof(struct ip6_frag),
808 m->m_data += sizeof(struct ip6_frag);
809 m->m_len -= sizeof(struct ip6_frag);
811 /* This comes with no copy if the boundary is on cluster. */
812 if ((t = m_split(m, offset, wait)) == NULL)
814 m_adj(t, sizeof(struct ip6_frag));