fix and enable toeplitz hashing of pf_state_keys again.
authordlg <dlg@openbsd.org>
Sat, 24 Dec 2022 05:20:32 +0000 (05:20 +0000)
committerdlg <dlg@openbsd.org>
Sat, 24 Dec 2022 05:20:32 +0000 (05:20 +0000)
commit03a727d7dcc61f3460a8c2f93bb57d3524d893cd
tree9d6a0d86b5c84e468d3a8c382df867a3d2d113ba
parente2d954ca799391c48fb03e4b485c3105ee902d5d
fix and enable toeplitz hashing of pf_state_keys again.

the hash generated when setting up the pf pdesc struct uses outer
addresses, while the addresses used in the state table goes through
pf_state_key_addr_setup(), which does interesting things with some
ipv6 icmp values. state lookups used pf_state_key_addr_setup(), but
pf_state_key_setup copied the pdesc value, causing an inconsistency.
pf_state_key_setup now calls pf_state_key_addr_setup().

found by anton@
tested by anton@ florian@
sys/net/pf.c