mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-20 22:01:49 -04:00
BUG/MEDIUM: filters: Exec pre/post analysers only one time per filter
For each filter, pre and post callback functions must only be called one time. To do so, when one of them is finished, the corresponding analyser bit must be removed from pre_analyzers or post_analyzers bit field. It is only an issue with pre-analyser callback functions if the corresponding analyser yields. It may happens with lua action for instance. In this case, the filters pre analyser callback function is unexpectedly called several times. This patch should fix the issue #1263. It must be backported is all stable versions.
This commit is contained in:
parent
65b86685e1
commit
a6d3704e38
1 changed files with 2 additions and 0 deletions
|
|
@ -757,6 +757,7 @@ flt_pre_analyze(struct stream *s, struct channel *chn, unsigned int an_bit)
|
|||
ret = FLT_OPS(filter)->channel_pre_analyze(s, filter, chn, an_bit);
|
||||
if (ret <= 0)
|
||||
BREAK_EXECUTION(s, chn, check_result);
|
||||
filter->pre_analyzers &= ~an_bit;
|
||||
}
|
||||
} RESUME_FILTER_END;
|
||||
|
||||
|
|
@ -789,6 +790,7 @@ flt_post_analyze(struct stream *s, struct channel *chn, unsigned int an_bit)
|
|||
ret = FLT_OPS(filter)->channel_post_analyze(s, filter, chn, an_bit);
|
||||
if (ret < 0)
|
||||
break;
|
||||
filter->post_analyzers &= ~an_bit;
|
||||
}
|
||||
}
|
||||
ret = handle_analyzer_result(s, chn, 0, ret);
|
||||
|
|
|
|||
Loading…
Reference in a new issue