aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2024-01-19 21:10:12 +0100
committerpespin <pespin@sysmocom.de>2024-01-26 18:07:43 +0000
commit6f2749ce0d5298ca3372f5fbccf547d6734b438c (patch)
treebb12e7fbad0b598a3b2760867f4cebb3f54ce7a3
parent9d3635f7f798ceb910d22de6db578f77808de66a (diff)
vlr: Use new libosmogsm struct osmo_gsup_pdp_info fields
This also makes sure it doesn't compile against older libosmogsm gsup versions which would break ABI. Related: OS#6091 Depends: libosmocore.git Change-Id 70be3560659c58f24b8db529c4fc85da4bb0ec04 Change-Id: Ia002fd6e0334d56de34d352a0bf1a8604e2e9fd3
-rw-r--r--TODO-RELEASE1
-rw-r--r--src/libvlr/vlr.c9
2 files changed, 8 insertions, 2 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc9b..8b07972f3 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+libosmogsm >1.9.0 ABI breakage in struct osmo_gsup_pdp_info, use new fields pdp_type_* and pdp_address. \ No newline at end of file
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index fb034cf3c..e2e02bfce 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -731,7 +731,9 @@ struct sgsn_subscriber_pdp_data {
struct llist_head list;
unsigned int context_id;
- uint16_t pdp_type;
+ enum gsm48_pdp_type_org pdp_type_org;
+ enum gsm48_pdp_type_nr pdp_type_nr;
+ struct osmo_sockaddr pdp_address[2];
char apn_str[GSM_APN_LENGTH];
uint8_t qos_subscribed[20];
size_t qos_subscribed_len;
@@ -1024,7 +1026,10 @@ static void vlr_subscr_gsup_insert_data(struct vlr_subscr *vsub,
}
OSMO_ASSERT(pdp_data != NULL);
- pdp_data->pdp_type = pdp_info->pdp_type;
+ pdp_data->pdp_type_org = pdp_info->pdp_type_org;
+ pdp_data->pdp_type_nr = pdp_info->pdp_type_nr;
+ memcpy(&pdp_data->pdp_address[0], &pdp_info->pdp_address[0], sizeof(pdp_data->pdp_address[0]));
+ memcpy(&pdp_data->pdp_address[1], &pdp_info->pdp_address[1], sizeof(pdp_data->pdp_address[1]));
osmo_apn_to_str(pdp_data->apn_str,
pdp_info->apn_enc, pdp_info->apn_enc_len);
memcpy(pdp_data->qos_subscribed, pdp_info->qos_enc, pdp_info->qos_enc_len);