Common subdirectories: freeradius-1.1.2/debian and freeradius-1.1.2-retention-time/debian
Common subdirectories: freeradius-1.1.2/dialup_admin and freeradius-1.1.2-retention-time/dialup_admin
Common subdirectories: freeradius-1.1.2/doc and freeradius-1.1.2-retention-time/doc
Common subdirectories: freeradius-1.1.2/libltdl and freeradius-1.1.2-retention-time/libltdl
Common subdirectories: freeradius-1.1.2/man and freeradius-1.1.2-retention-time/man
Common subdirectories: freeradius-1.1.2/mibs and freeradius-1.1.2-retention-time/mibs
Common subdirectories: freeradius-1.1.2/raddb and freeradius-1.1.2-retention-time/raddb
Common subdirectories: freeradius-1.1.2/redhat and freeradius-1.1.2-retention-time/redhat
Common subdirectories: freeradius-1.1.2/scripts and freeradius-1.1.2-retention-time/scripts
Common subdirectories: freeradius-1.1.2/share and freeradius-1.1.2-retention-time/share
Common subdirectories: freeradius-1.1.2/src and freeradius-1.1.2-retention-time/src
Common subdirectories: freeradius-1.1.2/suse and freeradius-1.1.2-retention-time/suse
Common subdirectories: freeradius-1.1.2/todo and freeradius-1.1.2-retention-time/todo
Common subdirectories: freeradius-1.1.2/debian/patches and freeradius-1.1.2-retention-time/debian/patches
Common subdirectories: freeradius-1.1.2/dialup_admin/bin and freeradius-1.1.2-retention-time/dialup_admin/bin
Common subdirectories: freeradius-1.1.2/dialup_admin/conf and freeradius-1.1.2-retention-time/dialup_admin/conf
Common subdirectories: freeradius-1.1.2/dialup_admin/doc and freeradius-1.1.2-retention-time/dialup_admin/doc
Common subdirectories: freeradius-1.1.2/dialup_admin/htdocs and freeradius-1.1.2-retention-time/dialup_admin/htdocs
Common subdirectories: freeradius-1.1.2/dialup_admin/html and freeradius-1.1.2-retention-time/dialup_admin/html
Common subdirectories: freeradius-1.1.2/dialup_admin/lib and freeradius-1.1.2-retention-time/dialup_admin/lib
Common subdirectories: freeradius-1.1.2/dialup_admin/sql and freeradius-1.1.2-retention-time/dialup_admin/sql
Common subdirectories: freeradius-1.1.2/dialup_admin/htdocs/help and freeradius-1.1.2-retention-time/dialup_admin/htdocs/help
Common subdirectories: freeradius-1.1.2/dialup_admin/htdocs/images and freeradius-1.1.2-retention-time/dialup_admin/htdocs/images
Common subdirectories: freeradius-1.1.2/dialup_admin/htdocs/help/nomadix and freeradius-1.1.2-retention-time/dialup_admin/htdocs/help/nomadix
Common subdirectories: freeradius-1.1.2/dialup_admin/html/buttons and freeradius-1.1.2-retention-time/dialup_admin/html/buttons
Common subdirectories: freeradius-1.1.2/dialup_admin/html/buttons/default and freeradius-1.1.2-retention-time/dialup_admin/html/buttons/default
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/crypt and freeradius-1.1.2-retention-time/dialup_admin/lib/crypt
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/lang and freeradius-1.1.2-retention-time/dialup_admin/lib/lang
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/ldap and freeradius-1.1.2-retention-time/dialup_admin/lib/ldap
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/sql and freeradius-1.1.2-retention-time/dialup_admin/lib/sql
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/lang/default and freeradius-1.1.2-retention-time/dialup_admin/lib/lang/default
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/lang/el and freeradius-1.1.2-retention-time/dialup_admin/lib/lang/el
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/sql/drivers and freeradius-1.1.2-retention-time/dialup_admin/lib/sql/drivers
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/sql/drivers/mysql and freeradius-1.1.2-retention-time/dialup_admin/lib/sql/drivers/mysql
Common subdirectories: freeradius-1.1.2/dialup_admin/lib/sql/drivers/pg and freeradius-1.1.2-retention-time/dialup_admin/lib/sql/drivers/pg
Common subdirectories: freeradius-1.1.2/doc/00-OLD and freeradius-1.1.2-retention-time/doc/00-OLD
Common subdirectories: freeradius-1.1.2/doc/examples and freeradius-1.1.2-retention-time/doc/examples
Common subdirectories: freeradius-1.1.2/doc/rfc and freeradius-1.1.2-retention-time/doc/rfc
Common subdirectories: freeradius-1.1.2/man/man1 and freeradius-1.1.2-retention-time/man/man1
Common subdirectories: freeradius-1.1.2/man/man5 and freeradius-1.1.2-retention-time/man/man5
Common subdirectories: freeradius-1.1.2/man/man8 and freeradius-1.1.2-retention-time/man/man8
Common subdirectories: freeradius-1.1.2/raddb/certs and freeradius-1.1.2-retention-time/raddb/certs
diff -ur freeradius-1.1.2/raddb/radiusd.conf.in freeradius-1.1.2-retention-time/raddb/radiusd.conf.in
--- freeradius-1.1.2/raddb/radiusd.conf.in	Thu Apr 20 20:40:29 2006
+++ freeradius-1.1.2-retention-time/raddb/radiusd.conf.in	Tue Jul 25 16:57:15 2006
@@ -1689,6 +1689,11 @@
 		# maximum-timeout: If not zero specifies the maximum time in seconds an
 		# entry may be active. Default: 0
 		maximum-timeout = 0
+
+		# retention-time: If not zero specifies the amount of seconds to wait 
+		# before releasing an entry after receiving an acct Stop packet. 
+		# Default: 0
+		retention-time = 0
 	}
 
 	# $INCLUDE  ${confdir}/sqlippool.conf
Common subdirectories: freeradius-1.1.2/raddb/certs/demoCA and freeradius-1.1.2-retention-time/raddb/certs/demoCA
Common subdirectories: freeradius-1.1.2/src/billing and freeradius-1.1.2-retention-time/src/billing
Common subdirectories: freeradius-1.1.2/src/include and freeradius-1.1.2-retention-time/src/include
Common subdirectories: freeradius-1.1.2/src/lib and freeradius-1.1.2-retention-time/src/lib
Common subdirectories: freeradius-1.1.2/src/main and freeradius-1.1.2-retention-time/src/main
Common subdirectories: freeradius-1.1.2/src/modules and freeradius-1.1.2-retention-time/src/modules
Common subdirectories: freeradius-1.1.2/src/tests and freeradius-1.1.2-retention-time/src/tests
Common subdirectories: freeradius-1.1.2/src/main/00-OLD and freeradius-1.1.2-retention-time/src/main/00-OLD
Common subdirectories: freeradius-1.1.2/src/modules/rlm_acct_unique and freeradius-1.1.2-retention-time/src/modules/rlm_acct_unique
Common subdirectories: freeradius-1.1.2/src/modules/rlm_always and freeradius-1.1.2-retention-time/src/modules/rlm_always
Common subdirectories: freeradius-1.1.2/src/modules/rlm_attr_filter and freeradius-1.1.2-retention-time/src/modules/rlm_attr_filter
Common subdirectories: freeradius-1.1.2/src/modules/rlm_attr_rewrite and freeradius-1.1.2-retention-time/src/modules/rlm_attr_rewrite
Common subdirectories: freeradius-1.1.2/src/modules/rlm_chap and freeradius-1.1.2-retention-time/src/modules/rlm_chap
Common subdirectories: freeradius-1.1.2/src/modules/rlm_checkval and freeradius-1.1.2-retention-time/src/modules/rlm_checkval
Common subdirectories: freeradius-1.1.2/src/modules/rlm_counter and freeradius-1.1.2-retention-time/src/modules/rlm_counter
Common subdirectories: freeradius-1.1.2/src/modules/rlm_cram and freeradius-1.1.2-retention-time/src/modules/rlm_cram
Common subdirectories: freeradius-1.1.2/src/modules/rlm_dbm and freeradius-1.1.2-retention-time/src/modules/rlm_dbm
Common subdirectories: freeradius-1.1.2/src/modules/rlm_detail and freeradius-1.1.2-retention-time/src/modules/rlm_detail
Common subdirectories: freeradius-1.1.2/src/modules/rlm_digest and freeradius-1.1.2-retention-time/src/modules/rlm_digest
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap and freeradius-1.1.2-retention-time/src/modules/rlm_eap
Common subdirectories: freeradius-1.1.2/src/modules/rlm_example and freeradius-1.1.2-retention-time/src/modules/rlm_example
Common subdirectories: freeradius-1.1.2/src/modules/rlm_exec and freeradius-1.1.2-retention-time/src/modules/rlm_exec
Common subdirectories: freeradius-1.1.2/src/modules/rlm_expr and freeradius-1.1.2-retention-time/src/modules/rlm_expr
Common subdirectories: freeradius-1.1.2/src/modules/rlm_fastusers and freeradius-1.1.2-retention-time/src/modules/rlm_fastusers
Common subdirectories: freeradius-1.1.2/src/modules/rlm_files and freeradius-1.1.2-retention-time/src/modules/rlm_files
Common subdirectories: freeradius-1.1.2/src/modules/rlm_ippool and freeradius-1.1.2-retention-time/src/modules/rlm_ippool
Common subdirectories: freeradius-1.1.2/src/modules/rlm_krb5 and freeradius-1.1.2-retention-time/src/modules/rlm_krb5
Common subdirectories: freeradius-1.1.2/src/modules/rlm_ldap and freeradius-1.1.2-retention-time/src/modules/rlm_ldap
Common subdirectories: freeradius-1.1.2/src/modules/rlm_mschap and freeradius-1.1.2-retention-time/src/modules/rlm_mschap
Common subdirectories: freeradius-1.1.2/src/modules/rlm_ns_mta_md5 and freeradius-1.1.2-retention-time/src/modules/rlm_ns_mta_md5
Common subdirectories: freeradius-1.1.2/src/modules/rlm_otp and freeradius-1.1.2-retention-time/src/modules/rlm_otp
Common subdirectories: freeradius-1.1.2/src/modules/rlm_pam and freeradius-1.1.2-retention-time/src/modules/rlm_pam
Common subdirectories: freeradius-1.1.2/src/modules/rlm_pap and freeradius-1.1.2-retention-time/src/modules/rlm_pap
Common subdirectories: freeradius-1.1.2/src/modules/rlm_passwd and freeradius-1.1.2-retention-time/src/modules/rlm_passwd
Common subdirectories: freeradius-1.1.2/src/modules/rlm_perl and freeradius-1.1.2-retention-time/src/modules/rlm_perl
Common subdirectories: freeradius-1.1.2/src/modules/rlm_preprocess and freeradius-1.1.2-retention-time/src/modules/rlm_preprocess
Common subdirectories: freeradius-1.1.2/src/modules/rlm_python and freeradius-1.1.2-retention-time/src/modules/rlm_python
Common subdirectories: freeradius-1.1.2/src/modules/rlm_radutmp and freeradius-1.1.2-retention-time/src/modules/rlm_radutmp
Common subdirectories: freeradius-1.1.2/src/modules/rlm_realm and freeradius-1.1.2-retention-time/src/modules/rlm_realm
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sim_files and freeradius-1.1.2-retention-time/src/modules/rlm_sim_files
Common subdirectories: freeradius-1.1.2/src/modules/rlm_smb and freeradius-1.1.2-retention-time/src/modules/rlm_smb
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql and freeradius-1.1.2-retention-time/src/modules/rlm_sql
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql_log and freeradius-1.1.2-retention-time/src/modules/rlm_sql_log
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sqlcounter and freeradius-1.1.2-retention-time/src/modules/rlm_sqlcounter
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sqlippool and freeradius-1.1.2-retention-time/src/modules/rlm_sqlippool
Common subdirectories: freeradius-1.1.2/src/modules/rlm_unix and freeradius-1.1.2-retention-time/src/modules/rlm_unix
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/libeap and freeradius-1.1.2-retention-time/src/modules/rlm_eap/libeap
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types/rlm_eap_gtc and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types/rlm_eap_gtc
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types/rlm_eap_leap and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types/rlm_eap_leap
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types/rlm_eap_md5 and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types/rlm_eap_md5
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types/rlm_eap_mschapv2 and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types/rlm_eap_mschapv2
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types/rlm_eap_peap and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types/rlm_eap_peap
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types/rlm_eap_sim and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types/rlm_eap_sim
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types/rlm_eap_tls and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types/rlm_eap_tls
Common subdirectories: freeradius-1.1.2/src/modules/rlm_eap/types/rlm_eap_ttls and freeradius-1.1.2-retention-time/src/modules/rlm_eap/types/rlm_eap_ttls
diff -ur freeradius-1.1.2/src/modules/rlm_ippool/rlm_ippool.c freeradius-1.1.2-retention-time/src/modules/rlm_ippool/rlm_ippool.c
--- freeradius-1.1.2/src/modules/rlm_ippool/rlm_ippool.c	Mon May  3 12:51:26 2004
+++ freeradius-1.1.2-retention-time/src/modules/rlm_ippool/rlm_ippool.c	Tue Jul 25 17:03:22 2006
@@ -49,6 +49,10 @@
  *   to request->timestamp and timeout to %{Session-Timeout:-0}. When we search for a free entry
  *   we check if timeout has expired. If it has then we free the entry. We also add a maximum
  *   timeout configuration directive. If it is non zero then we also use that one to free entries.
+ * Jul 2006, Sebastien Cantos <s.cantos@neopost.com>
+ * - Add a retention parameter that allows to make sure an IP is kept used in the pool for a certain
+ *   amount of time before being avalaible in the pool. This solves a problem dealing with TCP 
+ *   TIME_WAIT state when an IP is assigned to a client just after being released.
  */
 
 #include "config.h"
@@ -113,6 +117,7 @@
 	uint32_t range_stop;
 	uint32_t netmask;
 	time_t max_timeout;
+	time_t ret_time;
 	int cache_size;
 	int override;
 	GDBM_FILE gdbm;
@@ -164,6 +169,7 @@
   { "cache-size", PW_TYPE_INTEGER, offsetof(rlm_ippool_t,cache_size), NULL, "1000" },
   { "override", PW_TYPE_BOOLEAN, offsetof(rlm_ippool_t,override), NULL, "no" },
   { "maximum-timeout", PW_TYPE_INTEGER, offsetof(rlm_ippool_t,max_timeout), NULL, "0" },
+  { "retention-time", PW_TYPE_INTEGER, offsetof(rlm_ippool_t,ret_time), NULL, "0" },
   { NULL, -1, 0, NULL, NULL }
 };
 
@@ -384,13 +390,20 @@
 
 		/*
 		 * If the entry was found set active to zero
+		 * or keep it active during retention time
 		 */
 		memcpy(&entry, data_datum.dptr, sizeof(ippool_info));
 		free(data_datum.dptr);
 		DEBUG("rlm_ippool: Deallocated entry for ip/port: %s/%u",ip_ntoa(str,entry.ipaddr),port);
-		entry.active = 0;
-		entry.timestamp = 0;
-		entry.timeout = 0;
+		if (data->ret_time > 0) {
+			DEBUG("rlm_ippool: Entry will be kept active during retention time: %d seconds",data->ret_time);
+			entry.timestamp = request->timestamp;
+			entry.timeout = data->ret_time;
+		} else {
+			entry.active = 0;
+			entry.timestamp = 0;
+			entry.timeout = 0;
+		}
 
 		/*
 		 * Save the reference to the entry
Common subdirectories: freeradius-1.1.2/src/modules/rlm_otp/cardops and freeradius-1.1.2-retention-time/src/modules/rlm_otp/cardops
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers/rlm_sql_db2 and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers/rlm_sql_db2
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers/rlm_sql_freetds and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers/rlm_sql_freetds
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers/rlm_sql_iodbc and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers/rlm_sql_iodbc
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers/rlm_sql_mysql and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers/rlm_sql_mysql
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers/rlm_sql_oracle and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers/rlm_sql_oracle
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers/rlm_sql_postgresql and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers/rlm_sql_postgresql
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers/rlm_sql_sybase and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers/rlm_sql_sybase
Common subdirectories: freeradius-1.1.2/src/modules/rlm_sql/drivers/rlm_sql_unixodbc and freeradius-1.1.2-retention-time/src/modules/rlm_sql/drivers/rlm_sql_unixodbc
Common subdirectories: freeradius-1.1.2/src/tests/eapcrypto-01 and freeradius-1.1.2-retention-time/src/tests/eapcrypto-01
Common subdirectories: freeradius-1.1.2/src/tests/eapmd5-01 and freeradius-1.1.2-retention-time/src/tests/eapmd5-01
Common subdirectories: freeradius-1.1.2/src/tests/eapsim-02 and freeradius-1.1.2-retention-time/src/tests/eapsim-02
Common subdirectories: freeradius-1.1.2/src/tests/eapsim-03 and freeradius-1.1.2-retention-time/src/tests/eapsim-03
Common subdirectories: freeradius-1.1.2/src/tests/eapsim-04 and freeradius-1.1.2-retention-time/src/tests/eapsim-04
Common subdirectories: freeradius-1.1.2/src/tests/eapsim-05 and freeradius-1.1.2-retention-time/src/tests/eapsim-05
Common subdirectories: freeradius-1.1.2/src/tests/eapsim-06 and freeradius-1.1.2-retention-time/src/tests/eapsim-06
Common subdirectories: freeradius-1.1.2/src/tests/fips186-02 and freeradius-1.1.2-retention-time/src/tests/fips186-02
Common subdirectories: freeradius-1.1.2/src/tests/hmac-md5-01 and freeradius-1.1.2-retention-time/src/tests/hmac-md5-01
Common subdirectories: freeradius-1.1.2/src/tests/hmac-sha1-01 and freeradius-1.1.2-retention-time/src/tests/hmac-sha1-01
