pfsync_update_state() is too paranoid about pf_state::pfsync_state.
authorsashan <sashan@openbsd.org>
Mon, 5 Jun 2023 08:45:20 +0000 (08:45 +0000)
committersashan <sashan@openbsd.org>
Mon, 5 Jun 2023 08:45:20 +0000 (08:45 +0000)
commit51d2b5388cc4454e954ac6bf26c358ddc84105a1
treeb4fe3f7738e88fd70eca9d28c1af470b5f943589
parent0c23d0017e21171a8b288b32ed15018ecd360fed
pfsync_update_state() is too paranoid about pf_state::pfsync_state.
For example it should not be surprised if caller asks to remove
state from pfsync queue which has been removed already. That kind
of race is sorted out later when pfsync_update_state() calls to
pfsync_q_ins()/pfsync_q_del().  Change relaxes pfsync_update_state()
to panic on sync_state value which is unknown.

OK dlg@
sys/net/if_pfsync.c