Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106991828
D46529.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
636 B
Referenced Files
None
Subscribers
None
D46529.diff
View Options
diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -2115,6 +2115,12 @@
sc = ifp->if_softc;
+ m = m_unshare(m, M_NOWAIT);
+ if (m == NULL) {
+ OVPN_COUNTER_ADD(sc, lost_data_pkts_out, 1);
+ return (ENOBUFS);
+ }
+
OVPN_RLOCK(sc);
SDT_PROBE1(if_ovpn, tx, transmit, start, m);
@@ -2233,6 +2239,12 @@
M_ASSERTPKTHDR(m);
+ m = m_unshare(m, M_NOWAIT);
+ if (m == NULL) {
+ OVPN_COUNTER_ADD(sc, nomem_data_pkts_in, 1);
+ return (true);
+ }
+
OVPN_COUNTER_ADD(sc, transport_bytes_received, m->m_pkthdr.len - off);
ohdrlen = sizeof(*ohdr) - sizeof(ohdr->auth_tag);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 9, 4:00 PM (9 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15733121
Default Alt Text
D46529.diff (636 B)
Attached To
Mode
D46529: if_ovpn: ensure it's safe to modify the mbuf
Attached
Detach File
Event Timeline
Log In to Comment