Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102965630
D28160.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
911 B
Referenced Files
None
Subscribers
None
D28160.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D28160: netipsec: Fix handling of unmapped mbufs
Attached
Detach File
Event Timeline
Log In to Comment