Index: sys/netinet/ip_fastfwd.c =================================================================== --- sys/netinet/ip_fastfwd.c +++ sys/netinet/ip_fastfwd.c @@ -397,6 +397,31 @@ } /* + * Translate Layer 4 inbound checksum offloading flags to outbound + */ + if ((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) == + (CSUM_DATA_VALID | CSUM_PSEUDO_HDR) && + m->m_pkthdr.csum_data == 0xffff) { + /* L4 checksum was correct, but it's not present. */ + switch(ip->ip_p) { + case IPPROTO_TCP: + m->m_pkthdr.csum_flags |= CSUM_TCP; + break; + case IPPROTO_UDP: + m->m_pkthdr.csum_flags |= CSUM_UDP; + break; + case IPPROTO_SCTP: + m->m_pkthdr.csum_flags |= CSUM_SCTP; + break; + default: + /* + * No checksum offloading support + */ + break; + } + } + + /* * Check if packet fits MTU or if hardware will fragment for us */ if (ro.ro_rt->rt_mtu)