[PATCH] osmo-hlr[master]: Add hardcoded APN

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Tue Dec 20 15:51:50 UTC 2016


Review at  https://gerrit.osmocom.org/1459

Add hardcoded APN

Add APN '*' to PDP info part of GSUP response to make it possible to
test SGSN 'auth-policy remote'.

Change-Id: I95d69508aafc13e82f5f51fc6fe8f56cd7f45e2b
Related: OS#1794
---
M src/hlr.c
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/59/1459/1

diff --git a/src/hlr.c b/src/hlr.c
index d7d97b1..27a0ec2 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -24,6 +24,7 @@
 #include <osmocom/core/logging.h>
 #include <osmocom/core/application.h>
 #include <osmocom/gsm/gsup.h>
+#include <osmocom/gsm/apn.h>
 
 #include "db.h"
 #include "logging.h"
@@ -264,6 +265,7 @@
 void lu_op_tx_insert_subscr_data(struct lu_operation *luop)
 {
 	struct osmo_gsup_message gsup;
+	uint8_t apn[APN_MAXLEN];
 
 	OSMO_ASSERT(luop->state == LU_S_LU_RECEIVED ||
 		    luop->state == LU_S_CANCEL_ACK_RECEIVED);
@@ -276,7 +278,14 @@
 	gsup.hlr_enc;
 
 	if (luop->is_ps) {
-		/* FIXME: PDP infos */
+		/* FIXME: PDP infos - use more fine-grained access control
+		   instead of wildcard */
+		gsup.pdp_infos[0].have_info = 1;
+		gsup.pdp_infos[0].context_id = 1; // FIXME: use real value
+		gsup.pdp_infos[0].apn_enc = apn;
+		gsup.pdp_infos[0].apn_enc_len =
+			osmo_apn_from_str(gsup.pdp_infos[0].apn_enc, 2, "*");
+		gsup.num_pdp_infos = 1;
 	}
 
 	/* Send ISD to new VLR/SGSN */

-- 
To view, visit https://gerrit.osmocom.org/1459
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95d69508aafc13e82f5f51fc6fe8f56cd7f45e2b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list