fix state key reference underflow, when sk == skrev
the bug has been reported by Sebastien and Olivier Cherrier.
it has turned out the pf_state_key_link_reverse() does not
grab enough references when both state keys (sk and skrev)
are identical. This makes pf to trip assert later, when
references are being dropped:
panic(
ffffffff81dfbc8e) at panic+0x11d
__assert(
ffffffff81e64b54,
ffffffff81e0a6ee,33a,
ffffffff81e03b7f)
refcnt_rele(
fffffd810bf02458) at refcnt_rele+0x6f
pf_state_key_unref(
fffffd810bf023f0) at pf_state_key_unref+0x21
pf_remove_state(
fffffd810c0c4578) at pf_remove_state+0x1fa
pf_purge_expired_states(2) at pf_purge_expired_states+0x232
pf_purge(
ffffffff82236a30) at pf_purge+0x33
taskq_thread(
ffff800000032080) at taskq_thread+0x81
fixed tested by Olivier Cherrier and semarie@
OK semarie@