osmo-epdg: drop APN from Tunnel Request

The APN is far too late in the Tunnel Request as the APN is already
used by the EPDG/AAA when doing the ServerAssignmentRequest (on GSUP
the Location Update Request). So we need to move the APN
either into the Location Update Request or hardcode it.
This commit is contained in:
Alexander Couzens 2024-02-05 18:12:28 +01:00
parent 820185941a
commit a9404c3110
3 changed files with 3 additions and 13 deletions

View File

@ -195,7 +195,7 @@ static bool enqueue(private_osmo_epdg_gsup_client_t *this, gsup_request_t *req,
}
METHOD(osmo_epdg_gsup_client_t, tunnel_request, osmo_epdg_gsup_response_t*,
private_osmo_epdg_gsup_client_t *this, char *imsi, char *apn)
private_osmo_epdg_gsup_client_t *this, char *imsi)
{
struct osmo_gsup_message gsup_msg = {0};
struct osmo_gsup_pdp_info *pdp;
@ -212,16 +212,6 @@ METHOD(osmo_epdg_gsup_client_t, tunnel_request, osmo_epdg_gsup_response_t*,
}
strncpy(gsup_msg.imsi, imsi, sizeof(gsup_msg.imsi));
if (apn && strlen(apn) > 0)
{
gsup_msg.num_pdp_infos = 1;
pdp = &gsup_msg.pdp_infos[0];
pdp->context_id = 1;
pdp->have_info = 1;
pdp->apn_enc = apn;
pdp->apn_enc_len = strlen(apn);
}
msg = encode_to_msgb(&gsup_msg);
if (!msg)
{

View File

@ -67,7 +67,7 @@ struct osmo_epdg_gsup_client_t {
* @return NULL or the osmo_gsup_message
*/
osmo_epdg_gsup_response_t *(*tunnel_request)(osmo_epdg_gsup_client_t *this,
char *imsi, char *apn);
char *imsi);
/**
* Destroy a osmo_epdg_gsup_client_t.

View File

@ -123,7 +123,7 @@ METHOD(listener_t, authorize, bool,
goto err;
}
osmo_epdg_gsup_response_t *resp = this->gsup->tunnel_request(this->gsup, imsi, apn);
osmo_epdg_gsup_response_t *resp = this->gsup->tunnel_request(this->gsup, imsi);
if (!resp)
{
DBG1(DBG_NET, "epdg_listener: Tunnel Request: GSUP: couldn't send.");