svn commit: r339545 - head/sys/netpfil/ipfw

Andrey V. Elsukov ae at FreeBSD.org
Sun Oct 21 16:44:58 UTC 2018


Author: ae
Date: Sun Oct 21 16:44:57 2018
New Revision: 339545
URL: https://svnweb.freebsd.org/changeset/base/339545

Log:
  Do not decrement RST life time if keep_alive is not turned on.
  
  This allows use differen values configured by user for sysctl variable
  net.inet.ip.fw.dyn_rst_lifetime.
  
  Obtained from:	Yandex LLC
  MFC after:	3 weeks
  Sponsored by:	Yandex LLC

Modified:
  head/sys/netpfil/ipfw/ip_fw_dynamic.c

Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_dynamic.c	Sun Oct 21 16:37:53 2018	(r339544)
+++ head/sys/netpfil/ipfw/ip_fw_dynamic.c	Sun Oct 21 16:44:57 2018	(r339545)
@@ -979,7 +979,8 @@ dyn_update_tcp_state(struct dyn_data *data, const stru
 		break;
 
 	default:
-		if (V_dyn_rst_lifetime >= V_dyn_keepalive_period)
+		if (V_dyn_keepalive != 0 &&
+		    V_dyn_rst_lifetime >= V_dyn_keepalive_period)
 			V_dyn_rst_lifetime = V_dyn_keepalive_period - 1;
 		expire = time_uptime + V_dyn_rst_lifetime;
 	}


More information about the svn-src-head mailing list