Writing out the L2TP control packet requires 12 bytes of

contiguous memory but in one path we did not always guarantee this,
thus do a m_pullup() there.

PR:			214385
Submitted by:		Joe Jones (joeknockando googlemail.com)
MFC after:		3 days
This commit is contained in:
Bjoern A. Zeeb 2016-11-17 14:03:44 +00:00
parent f3b37a1f47
commit 310dc5a403

View File

@ -1544,6 +1544,16 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
priv->stats.memoryFailures++;
return (ENOBUFS);
}
/*
* The below requires 12 contiguous bytes for the L2TP header
* to be written into.
*/
m = m_pullup(m, 12);
if (m == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
}
}
/* Fill in L2TP header */