[Midnightbsd-cvs] src [9023] trunk/sys/netpfil/ipfw/ip_fw_sockopt.c: when removing a specific set, call ipfw_expire_dyn_rules once.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Sep 29 21:57:39 EDT 2016
Revision: 9023
http://svnweb.midnightbsd.org/src/?rev=9023
Author: laffer1
Date: 2016-09-29 21:57:39 -0400 (Thu, 29 Sep 2016)
Log Message:
-----------
when removing a specific set, call ipfw_expire_dyn_rules once.
Modified Paths:
--------------
trunk/sys/netpfil/ipfw/ip_fw_sockopt.c
Modified: trunk/sys/netpfil/ipfw/ip_fw_sockopt.c
===================================================================
--- trunk/sys/netpfil/ipfw/ip_fw_sockopt.c 2016-09-30 01:57:08 UTC (rev 9022)
+++ trunk/sys/netpfil/ipfw/ip_fw_sockopt.c 2016-09-30 01:57:39 UTC (rev 9023)
@@ -377,14 +377,15 @@
/* 4. swap the maps (under BH_LOCK) */
map = swap_map(chain, map, chain->n_rules - n);
/* 5. now remove the rules deleted from the old map */
+ if (cmd == 1)
+ ipfw_expire_dyn_rules(chain, NULL, new_set);
for (i = start; i < end; i++) {
- int l;
rule = map[i];
if (keep_rule(rule, cmd, new_set, num))
continue;
- l = RULESIZE(rule);
- chain->static_len -= l;
- ipfw_expire_dyn_rules(chain, rule, RESVD_SET);
+ chain->static_len -= RULESIZE(rule);
+ if (cmd != 1)
+ ipfw_expire_dyn_rules(chain, rule, RESVD_SET);
rule->x_next = chain->reap;
chain->reap = rule;
}
More information about the Midnightbsd-cvs
mailing list