Remove ptei->value check from ipfw_link_table_values():
even if there was non-zero number of restarts, we would unref/clear all value references and start ipfw_link_table_values() once again with (mostly) cleared "tei" buffer. Additionally, ptei->ptv stores only to-be-added values, not existing ones. This is a forgotten piece of previous value refconting implementation, and now it is simply incorrect.
This commit is contained in:
parent
f7a28383ef
commit
1493021aa5
@ -563,17 +563,6 @@ ipfw_link_table_values(struct ip_fw_chain *ch, struct tableop_state *ts)
|
|||||||
/* Let's try to link values */
|
/* Let's try to link values */
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
ptei = &tei[i];
|
ptei = &tei[i];
|
||||||
if (ptei->value != 0) {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We may be here after several process restarts,
|
|
||||||
* so we need to update all fields that might
|
|
||||||
* have changed.
|
|
||||||
*/
|
|
||||||
ptv = (struct table_val_link *)ptei->ptv;
|
|
||||||
ptv->pval = &pval[i];
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check if record has appeared */
|
/* Check if record has appeared */
|
||||||
mask_table_value(ptei->pvalue, &tval, ts->vmask);
|
mask_table_value(ptei->pvalue, &tval, ts->vmask);
|
||||||
|
Loading…
Reference in New Issue
Block a user