svn commit: r248497 - stable/9/sys/netpfil/ipfw

Alexander V. Chernikov melifaro at FreeBSD.org
Tue Mar 19 12:42:14 UTC 2013


Author: melifaro
Date: Tue Mar 19 12:42:14 2013
New Revision: 248497
URL: http://svnweb.freebsd.org/changeset/base/248497

Log:
  MFC r247626.
  
  Fix callout expiring dynamic rules.
  
  PR:		kern/175530
  Submitted by:	Vladimir Spiridenkov <vs at gtn.ru>

Modified:
  stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c
==============================================================================
--- stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c	Tue Mar 19 12:35:33 2013	(r248496)
+++ stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c	Tue Mar 19 12:42:14 2013	(r248497)
@@ -982,8 +982,8 @@ ipfw_dyn_tick(void * vnetx) 
 
 	chain = &V_layer3_chain;
 
-	/* Run keepalive checks every keepalive_interval iff ka is enabled */
-	if ((V_dyn_keepalive_last + V_dyn_keepalive_interval >= time_uptime) &&
+	/* Run keepalive checks every keepalive_period iff ka is enabled */
+	if ((V_dyn_keepalive_last + V_dyn_keepalive_period <= time_uptime) &&
 	    (V_dyn_keepalive != 0)) {
 		V_dyn_keepalive_last = time_uptime;
 		check_ka = 1;
@@ -1322,7 +1322,7 @@ ipfw_dyn_init(struct ip_fw_chain *chain)
         V_dyn_keepalive_interval = 20;
         V_dyn_keepalive_period = 5;
         V_dyn_keepalive = 1;    /* do send keepalives */
-	V_dyn_keepalive = time_uptime;
+	V_dyn_keepalive_last = time_uptime;
         
         V_dyn_max = 4096;       /* max # of dynamic rules */
 


More information about the svn-src-stable-9 mailing list