From 5db6857204a6f89606812b77f3fa43d668340709 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 9 Jul 2017 13:18:17 +0200 Subject: sgsn: Fill the cch_pdp with a value coming from the tlv structure For some GGSNs we need to insert the PDP Charging Characteristics that were returned. We receive these values from GSUP and will fill them into the tlv structure when finding the ggsn context. Change-Id: I1725bfd2403d29ce3550bfcd6fcc1498426ef906 --- src/gprs/sgsn_libgtp.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gprs/sgsn_libgtp.c') diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c index 7595bf83c..0a0de0808 100644 --- a/src/gprs/sgsn_libgtp.c +++ b/src/gprs/sgsn_libgtp.c @@ -234,6 +234,13 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, memcpy(pdp->qos_req.v, qos, pdp->qos_req.l); } + /* charging characteristics if present */ + if (TLVP_LEN(tp, OSMO_IE_GSM_CHARG_CHAR) > 0) { + OSMO_ASSERT(TLVP_LEN(tp, OSMO_IE_GSM_CHARG_CHAR) <= sizeof(pdp->cch_pdp)); + memcpy(&pdp->cch_pdp, TLVP_VAL(tp, OSMO_IE_GSM_CHARG_CHAR), + TLVP_LEN(tp, OSMO_IE_GSM_CHARG_CHAR)); + } + /* SGSN address for control plane */ pdp->gsnlc.l = sizeof(sgsn->cfg.gtp_listenaddr.sin_addr); memcpy(pdp->gsnlc.v, &sgsn->cfg.gtp_listenaddr.sin_addr, -- cgit v1.2.3