aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/sgsn_libgtp.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-09 20:37:47 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-07-13 11:51:50 +0200
commitfa1201004f85b6e44d746d6044d5a43d04634fa4 (patch)
tree057657da9a1e30376ecc86372d242c51a4c70dfa /src/gprs/sgsn_libgtp.c
parenta98fead4642ba0ecf7ab0e7862fb468d0ae911ad (diff)
osmo-sgsn: ping GGSN periodically and check for restart counter
Before this commit, echo req/rsp logic was implemented in libgtp but never used in osmo-sgsn. This commit adds a timer which periodically sends a GTP ECHO Request to every GGSN if there's at least one pdpd context associated with it. This way by checking the restart counter in the ECHO Reply it can be known if the GGSN was restarted. In this case, logic already present in osmo-sgsn will terminate all pdp contexts associated with that GGSN. Change-Id: I9d714726785407859f26bbef052cd0efc28e8dae
Diffstat (limited to 'src/gprs/sgsn_libgtp.c')
-rw-r--r--src/gprs/sgsn_libgtp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index 2da8c4a74..88cea5d4a 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -460,6 +460,11 @@ void sgsn_pdp_upd_gtp_u(struct sgsn_pdp_ctx *pdp, void *addr, size_t alen)
gtp_update_context(pdp->ggsn->gsn, pdp->lib, pdp, &pdp->lib->hisaddr0);
}
+void sgsn_ggsn_echo_req(struct sgsn_ggsn_ctx *ggc)
+{
+ gtp_echo_req(ggc->gsn, ggc->gtp_version, NULL, &ggc->remote_addr);
+}
+
#ifdef BUILD_IU
/* Callback for RAB assignment response */
int sgsn_ranap_rab_ass_resp(struct sgsn_mm_ctx *ctx, RANAP_RAB_SetupOrModifiedItemIEs_t *setup_ies)