pfsync: add missing bucket lock

pfsync_q_ins() expects us to hold the bucket lock, but when we enter it
from pfsync_state_import() we don't.

MFC after:	2 weeks
This commit is contained in:
Kristof Provost 2023-02-02 10:34:57 +01:00
parent fdbfaefefa
commit 0ed5f66c5a

View File

@ -605,7 +605,11 @@ pfsync_state_import(struct pfsync_state *sp, int flags)
if (!(flags & PFSYNC_SI_IOCTL)) {
st->state_flags &= ~PFSTATE_NOSYNC;
if (st->state_flags & PFSTATE_ACK) {
struct pfsync_bucket *b = pfsync_get_bucket(sc, st);
PFSYNC_BUCKET_LOCK(b);
pfsync_q_ins(st, PFSYNC_S_IACK, true);
PFSYNC_BUCKET_UNLOCK(b);
pfsync_push_all(sc);
}
}