Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/pf/pf.c
Show First 20 Lines • Show All 5,991 Lines • ▼ Show 20 Lines | pf_route(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp, | ||||
/* Copied from FreeBSD 10.0-CURRENT ip_output. */ | /* Copied from FreeBSD 10.0-CURRENT ip_output. */ | ||||
m0->m_pkthdr.csum_flags |= CSUM_IP; | m0->m_pkthdr.csum_flags |= CSUM_IP; | ||||
if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { | if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { | ||||
in_delayed_cksum(m0); | in_delayed_cksum(m0); | ||||
m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; | m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; | ||||
} | } | ||||
#if defined(SCTP) || defined(SCTP_SUPPORT) | #if defined(SCTP) || defined(SCTP_SUPPORT) | ||||
if (m0->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { | if (m0->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { | ||||
m0 = mb_unmapped_to_ext(m0); | |||||
if (m0 == NULL) | |||||
goto done; | |||||
sctp_delayed_cksum(m0, (uint32_t)(ip->ip_hl << 2)); | sctp_delayed_cksum(m0, (uint32_t)(ip->ip_hl << 2)); | ||||
m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; | m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; | ||||
} | } | ||||
#endif | #endif | ||||
/* | /* | ||||
* If small enough for interface, or the interface will take | * If small enough for interface, or the interface will take | ||||
* care of the fragmentation for us, we can just send directly. | * care of the fragmentation for us, we can just send directly. | ||||
▲ Show 20 Lines • Show All 1,357 Lines • Show Last 20 Lines |