Page MenuHomeFreeBSD

D46529.diff
No OneTemporary

D46529.diff

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

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)

Event Timeline