summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-04-25 15:39:19 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-04-25 19:24:30 +0200
commit687270de3ab5f993c17d8447ace4d8d569145ee3 (patch)
tree6fb66521a8fe15dce3e8adfb88928f91b3dad71b
parent96f88fda064476ac5ebe0ad4271c29d9c44c567b (diff)
RAB parameters: apply use_x213_nsap parameter addition
Add use_x213_nsap parameter to iu_rab_act_ps(), pass the new parameter from two callers as 1 such that there is no functional change.
-rw-r--r--openbsc/include/openbsc/iu.h4
-rw-r--r--openbsc/src/gprs/gprs_gmm.c2
-rw-r--r--openbsc/src/gprs/sgsn_libgtp.c2
-rw-r--r--openbsc/src/libiu/iu.c5
4 files changed, 8 insertions, 5 deletions
diff --git a/openbsc/include/openbsc/iu.h b/openbsc/include/openbsc/iu.h
index 3a7c9f9..fc1a891 100644
--- a/openbsc/include/openbsc/iu.h
+++ b/openbsc/include/openbsc/iu.h
@@ -1,5 +1,7 @@
#pragma once
+#include <stdbool.h>
+
struct sgsn_pdp_ctx;
struct msgb;
struct gprs_ra_id;
@@ -46,7 +48,7 @@ int iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac);
int iu_page_ps(const char *imsi, const uint32_t *ptmsi, uint16_t lac, uint8_t rac);
int iu_rab_act_cs(struct ue_conn_ctx *ue_ctx, uint32_t rtp_ip, uint16_t rtp_port);
-int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp);
+int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp, bool use_x213_nsap);
int iu_rab_deact(struct ue_conn_ctx *ue_ctx, uint8_t rab_id);
int iu_tx_sec_mode_cmd(struct ue_conn_ctx *uectx, struct gsm_auth_tuple *tp,
int send_ck, int new_key);
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 51ce22b..208faa9 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -712,7 +712,7 @@ void activate_pdp_rabs(struct sgsn_mm_ctx *ctx)
uint8_t rab_id;
llist_for_each_entry(pdp, &ctx->pdp_list, list) {
rab_id = rab_id_from_mm_ctx(ctx);
- iu_rab_act_ps(rab_id, pdp);
+ iu_rab_act_ps(rab_id, pdp, 1);
}
}
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c
index 30cb07c..9277a5d 100644
--- a/openbsc/src/gprs/sgsn_libgtp.c
+++ b/openbsc/src/gprs/sgsn_libgtp.c
@@ -373,7 +373,7 @@ static int create_pdp_conf(struct pdp_t *pdp, void *cbp, int cause)
uint8_t rab_id;
rab_id = rab_id_from_mm_ctx(pctx);
- iu_rab_act_ps(rab_id, pctx);
+ iu_rab_act_ps(rab_id, pctx, 1);
return 0;
}
diff --git a/openbsc/src/libiu/iu.c b/openbsc/src/libiu/iu.c
index a07cd54..86de1f3 100644
--- a/openbsc/src/libiu/iu.c
+++ b/openbsc/src/libiu/iu.c
@@ -195,7 +195,7 @@ int iu_rab_act_cs(struct ue_conn_ctx *ue_ctx, uint32_t rtp_ip, uint16_t rtp_port
return iu_rab_act(ue_ctx, msg);
}
-int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp)
+int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp, bool use_x213_nsap)
{
struct msgb *msg;
struct sgsn_mm_ctx *mm = pdp->mm;
@@ -208,7 +208,8 @@ int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp)
memcpy(&ggsn_ip, pdp->lib->gsnru.v, pdp->lib->gsnru.l);
ggsn_ip = htonl(ggsn_ip);
- msg = ranap_new_msg_rab_assign_data(rab_id, ggsn_ip, pdp->lib->teid_own);
+ msg = ranap_new_msg_rab_assign_data(rab_id, ggsn_ip,
+ pdp->lib->teid_own, use_x213_nsap);
msg->l2h = msg->data;
return iu_rab_act(uectx, msg);
}