aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-01-06 16:32:41 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-18 18:27:19 +0100
commit0f47b8fae743769a6627f8654444b4f0d665e050 (patch)
treebfe14ac19d8734332d818776e86344773ff9b20e /openbsc/include
parentb8fb1409d1ed18dc198b430895a74e680640c2b1 (diff)
gprs: Add expiry timeout for subscriber entries
Set the expiry delay after the subscriber has been deleted (e.g. by freeing the MM context). If cancelled, the subscriber will be deleted immediately and no timeout will be set. If the expiry time is set to SGSN_TIMEOUT_NEVER, no timer will be started and the subscriber entry will be kept until it is cancelled. The following VTY command is added to the sgsn node: - subscriber-expiry-time <0-999999> set expiry time in seconds - no subscriber-expiry-time set to SGSN_TIMEOUT_NEVER The default is an expiry time of 0 seconds, which means that the subscriber entries are wiped out immediately after an MM context is destroyed. Note that unused MM contexts are not expired yet. Therefore the subscriber will only be expired after a successful MM detach. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h1
-rw-r--r--openbsc/include/openbsc/sgsn.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index c92d1cc7b..e707c77d7 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -276,6 +276,7 @@ struct sgsn_subscriber_data {
struct gsm_auth_tuple auth_triplets[5];
int auth_triplets_updated;
int error_cause;
+ struct osmo_timer_list timer;
};
#define LOGGSUBSCRP(level, subscr, fmt, args...) \
diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h
index 78064dddc..8a4514627 100644
--- a/openbsc/include/openbsc/sgsn.h
+++ b/openbsc/include/openbsc/sgsn.h
@@ -7,6 +7,8 @@
#include <osmocom/gprs/gprs_ns.h>
#include <openbsc/gprs_sgsn.h>
+#define SGSN_TIMEOUT_NEVER (-1)
+
struct gprs_gsup_client;
enum sgsn_auth_policy {
@@ -31,6 +33,8 @@ struct sgsn_config {
struct sockaddr_in gsup_server_addr;
int gsup_server_port;
+ int subscriber_expiry_timeout;
+
int require_authentication;
int require_update_location;
};