mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Protect access to seq->xwin[] with the seq mutex.
MFC after: 5 weeks
This commit is contained in:
parent
631cabba47
commit
30b7addf5a
1 changed files with 4 additions and 1 deletions
|
|
@ -1462,6 +1462,7 @@ ng_l2tp_seq_rack_timeout(node_p node, hook_p hook, void *arg1, int arg2)
|
|||
/* Sanity check */
|
||||
L2TP_SEQ_CHECK(seq);
|
||||
|
||||
mtx_lock(&seq->mtx);
|
||||
priv->stats.xmitRetransmits++;
|
||||
|
||||
/* Have we reached the retransmit limit? If so, notify owner. */
|
||||
|
|
@ -1482,7 +1483,9 @@ ng_l2tp_seq_rack_timeout(node_p node, hook_p hook, void *arg1, int arg2)
|
|||
seq->acks = 0;
|
||||
|
||||
/* Retransmit oldest unack'd packet */
|
||||
if ((m = L2TP_COPY_MBUF(seq->xwin[0], M_NOWAIT)) == NULL)
|
||||
m = L2TP_COPY_MBUF(seq->xwin[0], M_NOWAIT);
|
||||
mtx_unlock(&seq->mtx);
|
||||
if (m == NULL)
|
||||
priv->stats.memoryFailures++;
|
||||
else
|
||||
ng_l2tp_xmit_ctrl(priv, m, seq->ns++);
|
||||
|
|
|
|||
Loading…
Reference in a new issue