diff --git a/sys/netgraph/ng_nat.c b/sys/netgraph/ng_nat.c --- a/sys/netgraph/ng_nat.c +++ b/sys/netgraph/ng_nat.c @@ -884,6 +884,10 @@ ip_len - (ip->ip_hl << 2))); if ((m->m_pkthdr.csum_flags & CSUM_TCP) == 0) { + m = mb_unmapped_to_ext(m); + if (m == NULL) { + return (ENOMEM); + } m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); in_delayed_cksum(m);