aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/signal.h1
-rw-r--r--openbsc/src/gprs/gb_proxy.c7
-rw-r--r--openbsc/src/gprs/gprs_ns.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h
index 6e0f5baca..fbb4163d7 100644
--- a/openbsc/include/openbsc/signal.h
+++ b/openbsc/include/openbsc/signal.h
@@ -149,6 +149,7 @@ enum signal_ns {
S_NS_RESET,
S_NS_BLOCK,
S_NS_UNBLOCK,
+ S_NS_ALIVE_EXP, /* Tns-alive expired more than N times */
};
struct ns_signal_data {
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index eac8d2c59..d9639a445 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -488,6 +488,13 @@ int gbprox_signal(unsigned int subsys, unsigned int signal,
nsvc->remote_end_is_sgsn = 1;
}
+ if (signal == S_NS_ALIVE_EXP && nsvc->remote_end_is_sgsn) {
+ LOGP(DGPRS, LOGL_NOTICE, "Tns alive expired too often, "
+ "re-starting RESET procedure\n");
+ nsip_connect(nsvc->nsi, &nsvc->ip.bts_addr, nsvc->nsei,
+ nsvc->nsvci);
+ }
+
/* We currently only care about signals from the SGSN */
if (!nsvc->remote_end_is_sgsn)
return 0;
diff --git a/openbsc/src/gprs/gprs_ns.c b/openbsc/src/gprs/gprs_ns.c
index 0ef0c3fcb..fd0b27a6e 100644
--- a/openbsc/src/gprs/gprs_ns.c
+++ b/openbsc/src/gprs/gprs_ns.c
@@ -362,6 +362,7 @@ static void gprs_ns_timer_cb(void *data)
"NSEI=%u Tns-alive expired more then "
"%u times, blocking NS-VC\n", nsvc->nsei,
NS_ALIVE_RETRIES);
+ ns_dispatch_signal(nsvc, S_NS_ALIVE_EXP, 0);
ns_dispatch_signal(nsvc, S_NS_BLOCK, NS_CAUSE_NSVC_BLOCKED);
return;
}