Fix fallout from r257223. Since pf_test_state_icmp() can call

pf_icmp_state_lookup() twice, we need to unlock previously found state.

Reported & tested by:	gavin
This commit is contained in:
glebius 2013-11-05 16:54:25 +00:00
parent 6ac4b0cbe3
commit c5f4e2274d

View File

@ -4607,6 +4607,8 @@ pf_test_state_icmp(struct pf_state **state, int direction, struct pfi_kif *kif,
if (ret >= 0) {
if (ret == PF_DROP && pd->af == AF_INET6 &&
icmp_dir == PF_OUT) {
if (*state)
PF_STATE_UNLOCK(*state);
ret = pf_icmp_state_lookup(&key, pd, state, m,
direction, kif, virtual_id, virtual_type,
icmp_dir, &iidx, multi);
@ -5058,6 +5060,8 @@ pf_test_state_icmp(struct pf_state **state, int direction, struct pfi_kif *kif,
if (ret >= 0) {
if (ret == PF_DROP && pd->af == AF_INET6 &&
icmp_dir == PF_OUT) {
if (*state)
PF_STATE_UNLOCK(*state);
ret = pf_icmp_state_lookup(&key, pd,
state, m, direction, kif,
virtual_id, virtual_type,