summaryrefslogtreecommitdiffstats
path: root/sys/netpfil/ipfw
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2017-04-07 10:45:28 +0000
committerae <ae@FreeBSD.org>2017-04-07 10:45:28 +0000
commit7317fc9c0522c902a4a0a67b17c5c5d25d04bff9 (patch)
tree286dbee7a515adde5edb5994c532f81585d9afa7 /sys/netpfil/ipfw
parent8acfb7695965324b270562d67781bcbb4f2be2da (diff)
downloadFreeBSD-src-7317fc9c0522c902a4a0a67b17c5c5d25d04bff9.zip
FreeBSD-src-7317fc9c0522c902a4a0a67b17c5c5d25d04bff9.tar.gz
MFC r316329:
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 Sponsored by: Yandex LLC
Diffstat (limited to 'sys/netpfil/ipfw')
-rw-r--r--sys/netpfil/ipfw/ip_fw2.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
index 2710aaf..b6f9e34 100644
--- a/sys/netpfil/ipfw/ip_fw2.c
+++ b/sys/netpfil/ipfw/ip_fw2.c
@@ -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:
OpenPOWER on IntegriCloud