Page MenuHomeFreeBSD

D28160.diff
No OneTemporary

D28160.diff

Index: sys/netipsec/ipsec_output.c
===================================================================
--- sys/netipsec/ipsec_output.c
+++ sys/netipsec/ipsec_output.c
@@ -323,14 +323,22 @@
* this is done in the normal processing path.
*/
if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
+ m = mb_unmapped_to_ext(m);
+ if (m == NULL) {
+ IPSECSTAT_INC(ips_out_nomem);
+ return (ENOBUFS);
+ }
in_delayed_cksum(m);
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
}
#if defined(SCTP) || defined(SCTP_SUPPORT)
if (m->m_pkthdr.csum_flags & CSUM_SCTP) {
- struct ip *ip = mtod(m, struct ip *);
-
- sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2));
+ m = mb_unmapped_to_ext(m);
+ if (m == NULL) {
+ IPSECSTAT_INC(ips_out_nomem);
+ return (ENOBUFS);
+ }
+ sctp_delayed_cksum(m, mtod(m, struct ip *)->ip_hl << 2);
m->m_pkthdr.csum_flags &= ~CSUM_SCTP;
}
#endif

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 20, 7:12 AM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14732781
Default Alt Text
D28160.diff (911 B)

Event Timeline