aboutsummaryrefslogtreecommitdiffstats
path: root/gtp
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-10-07 18:45:54 +0200
committerHarald Welte <laforge@gnumonks.org>2011-10-07 18:45:54 +0200
commit3a4c67b4bf0067c4949a60bc750d01e0576c5e08 (patch)
tree9d92dc39d341fc0be78a7d389175a66ddf78712e /gtp
parent41af5691ef08fb70e2c65aba03c8b9e6c20983a6 (diff)
optionally do not send recovery with sgsnemu
According to 3GPP TS 29.060 recovery is optional, add command line option --norecovery to remove this field in sgsnemu Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr> Signed-off-by: Harald Welte <laforge@gnumonks.org>
Diffstat (limited to 'gtp')
-rw-r--r--gtp/gtp.c3
-rw-r--r--gtp/pdp.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/gtp/gtp.c b/gtp/gtp.c
index 111168b..4f75fd5 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -1056,7 +1056,8 @@ extern int gtp_create_context_req(struct gsn_t *gsn, struct pdp_t *pdp,
/* Section 7.7.11 */
- gtpie_tv1(&packet, &length, GTP_MAX, GTPIE_RECOVERY,
+ if (pdp->norecovery_given == 0)
+ gtpie_tv1(&packet, &length, GTP_MAX, GTPIE_RECOVERY,
gsn->restart_counter);
/* Section 7.7.12 */
diff --git a/gtp/pdp.h b/gtp/pdp.h
index aea5df7..e3bd06d 100644
--- a/gtp/pdp.h
+++ b/gtp/pdp.h
@@ -198,6 +198,7 @@ struct pdp_t {
int mstz_given; /* MS Time Zone given*/
struct ul255_t imeisv; /* IMEI Software Version */
int imeisv_given; /* IMEI Software Version given*/
+ int norecovery_given; /* norecovery given*/
/* Additional parameters used by library */