HomeFreeBSD

if_pfsync: lock buckets during pfsync_drop()

Description

if_pfsync: lock buckets during pfsync_drop()

We failed to lock buckets while dropping messages, which could potentially lead
to crashes, and is the likely cause of panics like:

pfsync_drop: st->sync_state == q

  1. pfsync_drop
  2. pfsync_q_ins
  3. pfsync_insert_state
  4. pf_state_insert

...

Handle this by only handling the currently relevant (and this locked) bucket.
This ensures that the bucket is locked while we manipulate it.
While here also log slightly more information in the KASSERT().

MFC after: 2 weeks
Sponsored by: Orange Business Services

Details

Provenance
kpAuthored on Jul 7 2024, 2:42 PM
Parents
rGf7dc514c01d0: nfsd.8: Update the man page for -N
Branches
Unknown
Tags
Unknown