* Remove the IPv6 fragmentation header from the mbuf. */
| 216 | * Remove the IPv6 fragmentation header from the mbuf. |
| 217 | */ |
| 218 | int |
| 219 | ip6_deletefraghdr(struct mbuf *m, int offset, int wait __unused) |
| 220 | { |
| 221 | struct ip6_hdr *ip6; |
| 222 | |
| 223 | KASSERT(m->m_len >= offset + sizeof(struct ip6_frag), |
| 224 | ("%s: ext headers not contigous in mbuf %p m_len %d >= " |
| 225 | "offset %d + %zu\n", __func__, m, m->m_len, offset, |
| 226 | sizeof(struct ip6_frag))); |
| 227 | |
| 228 | /* Delete frag6 header. */ |
| 229 | ip6 = mtod(m, struct ip6_hdr *); |
| 230 | bcopy(ip6, (char *)ip6 + sizeof(struct ip6_frag), offset); |
| 231 | m->m_data += sizeof(struct ip6_frag); |
| 232 | m->m_len -= sizeof(struct ip6_frag); |
| 233 | m->m_flags |= M_FRAGMENTED; |
| 234 | |
| 235 | return (0); |
| 236 | } |
| 237 | |
| 238 | /* |
| 239 | * Free a fragment reassembly header and all associated datagrams. |
no outgoing calls
no test coverage detected