diff options
author | glebius <glebius@FreeBSD.org> | 2012-09-28 20:43:03 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-09-28 20:43:03 +0000 |
commit | 5c64acd0e79bf2fed24d54bd269f42c18ce19f53 (patch) | |
tree | 1d7c79d53eb1893f560dbe0a7cc643bde0edf245 /sys/netinet/ip_carp.c | |
parent | 4b29d585cfcde7e84697e4af66a48144fb111e27 (diff) | |
download | FreeBSD-src-5c64acd0e79bf2fed24d54bd269f42c18ce19f53.zip FreeBSD-src-5c64acd0e79bf2fed24d54bd269f42c18ce19f53.tar.gz |
Simplify and somewhat redesign interaction between pf_purge_thread() and
pf_purge_expired_states().
Now pf purging daemon stores the current hash table index on stack
in pf_purge_thread(), and supplies it to next iteration of
pf_purge_expired_states(). The latter returns new index back.
The important change is that whenever pf_purge_expired_states() wraps
around the array it returns immediately. This makes our knowledge about
status of states expiry run more consistent. Prior to this change it
could happen that n-th run stopped on i-th entry, and returned (1) as
full run complete, then next (n+1) full run stopped on j-th entry, where
j < i, and that broke the mark-and-sweep algorythm that saves references
rules. A referenced rule was freed, and this later lead to a crash.
Diffstat (limited to 'sys/netinet/ip_carp.c')
0 files changed, 0 insertions, 0 deletions