Reset the cached state of last lookup in the dynamic states when an

external action is completed, but the rule search is continued.

External action handler can change the content of @args argument,
that is used for dynamic state lookup. Enforce the new lookup to be able
install new state, when the search is continued.

Obtained from:	Yandex LLC
MFC after:	1 week
Sponsored by:	Yandex LLC
This commit is contained in:
ae 2017-03-31 09:26:08 +00:00
parent 688581b7e7
commit 690961c9b0

View File

@ -2616,8 +2616,17 @@ do { \
* consider this as rule matching and
* update counters.
*/
if (retval == 0 && done == 0)
if (retval == 0 && done == 0) {
IPFW_INC_RULE_COUNTER(f, pktlen);
/*
* Reset the result of the last
* dynamic state lookup.
* External action can change
* @args content, and it may be
* used for new state lookup later.
*/
dyn_dir = MATCH_UNKNOWN;
}
break;
default: