aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gmm.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-04gprs: Track PMM statesDaniel Willmann1-2/+8
For Iu mode it is important to know when the UE is in PMM-IDLE mode since the SGSN will need to page the UE if there is data for it.
2016-05-01SGSN: Use PDP Context NSAPI as RAB IDHarald Welte1-3/+1
As Dieter has pointed out, the RANAP spec requires the RAB ID to be equal to the NSAPI of the PDP context for which it is established.
2016-04-25RAB parameters: apply use_x213_nsap parameter additionNeels Hofmeyr1-1/+1
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.
2016-04-20cosmetic: auth tuple memcpy: rather use target's sizeof()Neels Hofmeyr1-3/+3
2016-04-20tweak tmp_rand[] type to avoid compiler warningsNeels Hofmeyr1-2/+2
2016-04-20gprs_gmm.c: include openssl/rand.h against RAND_bytes() compiler warningNeels Hofmeyr1-0/+2
2016-04-19Iu RANAP event: add IU_EVENT_LINK_INVALIDATEDNeels Hofmeyr1-2/+2
See in-code comment...
2016-04-19gprs: Activate RABs from RoutingArea update request as wellDaniel Willmann1-8/+9
2016-04-19gprs: Keep track of key negotiation and set the key status flag in sec_mod_cmdDaniel Willmann1-30/+6
2016-04-12gprs: Change auth key for every new Iu connectionDaniel Willmann1-9/+57
2016-04-08sgsn: Reset mm ctx state in service request and after authorizationDaniel Willmann1-0/+4
2016-04-08gprs: Save integrity protection status inside ue ctx, not mm ctxDaniel Willmann1-3/+2
2016-04-08gprs: Use different RAB IDs for activationDaniel Willmann1-8/+18
2016-04-08sgsn: Pass RAB ID to iu_rab_act_ps() functionDaniel Willmann1-1/+1
2016-03-31Merge branch 'master' into sysmocom/iuNeels Hofmeyr1-1/+1
Conflicts: openbsc/src/libmsc/auth.c openbsc/src/libmsc/gsm_04_08.c openbsc/src/osmo-bsc/osmo_bsc_vty.c openbsc/tests/Makefile.am
2016-03-22iu_tx_sec_mode_cmd(): add send_ck flag parameterNeels Hofmeyr1-1/+1
In this way the caller can distinguish between sending an IK or an IK+CK Security Mode Command.
2016-03-22fix build: match Iu event cb enum argument type from declarationNeels Hofmeyr1-1/+1
2016-03-21debug log fixesNeels Hofmeyr1-1/+1
gprs_gmm.c: remove extraneous debug print arg. iu_cs.c: increment should not be in debug statement. Fixes at least one coverity warning.
2016-03-18gprs_gmm: Call gsm48_gmm_authorize from RA upd requestDaniel Willmann1-1/+8
In Iu mode the RA upd request can be called from a new Iu connection so we might need to reauthenticate the connection as well as turn on integrity protection.
2016-03-18libiu: Change gprs_transp_upd_key to be useful for CS as wellDaniel Willmann1-4/+6
gprs_transp_upd_key only sends a security mode command which is needed for CS as well so change it. Make sure it is called after the UE is authenticated in Iu mode.
2016-03-16gprs_gmm: Fix RA UPD handling for IU modeDaniel Willmann1-2/+7
2016-03-16Move event callback to gprs_gmmDaniel Willmann1-0/+34
2016-03-1504.08: apply new transaction id inline functionsNeels Hofmeyr1-4/+4
libosmocore recently added inline functions to relieve callers from applying bitmasks and bit shifts to access the transaction id of a GSM 04.08 header. Apply these functions.
2016-03-1504.08: apply new bitmask functions, fix bitmask useNeels Hofmeyr1-1/+1
Replace hardcoded protocol discriminator and message type bitmasks with function calls recently introduced in libosmocore. Note that the release 98 bitmasks slightly differ from the release 99 bitmasks. This patch uses the "default" gsm48_hdr_msg_type invocation, thus it depends on libosmocore whether 98 or 99 bitmasks are used. In some places, use of the bitmask was erratic. Fix these implicitly by employing the bitmask functions: * silent_call.c: silent_call_reroute(): add missing bitmask for MM. * bsc_msg_filter.c: bsc_msg_filter_initial(): RR vs. MM messages. * osmo_bsc_filter.c: bsc_find_msc() and bsc_scan_bts_msg(): RR vs. MM messages. * bsc_nat_rewrite.c: bsc_nat_rewrite_msg(): SMS vs. CC messages. * bsc_ussd.c: no bitmask is applicable for the message types used here. * gb_proxy.c: gbproxy_imsi_acquisition(): missing bit mask for pdisc. In gprs_gb_parse.c: gprs_gb_parse_dtap(), add a log notice for unexpected message types.
2016-03-1504.08: apply new transaction id inline functionsNeels Hofmeyr1-4/+4
libosmocore recently added inline functions to relieve callers from applying bitmasks and bit shifts to access the transaction id of a GSM 04.08 header. Apply these functions.
2016-03-1504.08: apply new bitmask functions, fix bitmask useNeels Hofmeyr1-1/+1
Replace hardcoded protocol discriminator and message type bitmasks with function calls recently introduced in libosmocore. Note that the release 98 bitmasks slightly differ from the release 99 bitmasks. This patch uses the "default" gsm48_hdr_msg_type invocation, thus it depends on libosmocore whether 98 or 99 bitmasks are used. In some places, use of the bitmask was erratic. Fix these implicitly by employing the bitmask functions: * silent_call.c: silent_call_reroute(): add missing bitmask for MM. * bsc_msg_filter.c: bsc_msg_filter_initial(): RR vs. MM messages. * osmo_bsc_filter.c: bsc_find_msc() and bsc_scan_bts_msg(): RR vs. MM messages. * bsc_nat_rewrite.c: bsc_nat_rewrite_msg(): SMS vs. CC messages. * bsc_ussd.c: no bitmask is applicable for the message types used here. * gb_proxy.c: gbproxy_imsi_acquisition(): missing bit mask for pdisc. In gprs_gb_parse.c: gprs_gb_parse_dtap(), add a log notice for unexpected message types.
2016-03-03WIP: gprs_gmm: Get mm ctx from RA update in Iu modeDaniel Willmann1-1/+13
Iu mode doesn't have tlli, so look up according to p-tmsi
2016-03-03WIP: Try and activate RABs after service requestDaniel Willmann1-1/+14
2016-03-03gprs_gmm: Log service request if not receieved from Iu modeDaniel Willmann1-1/+3
2016-03-03gprs_gmm: Send gmm_service_accept from gsm48_gmm_authorize()Daniel Willmann1-51/+54
2016-03-03gprs: Update ue ctx from msgDaniel Willmann1-0/+1
In case a Iu connection is reconnected we need to update the ue ctx
2016-03-03gprs_gmm: Fix mmctx tlli member rename after mergeDaniel Willmann1-1/+1
2016-03-03gprs: Handle GMM service request (Iu mode only)Daniel Willmann1-0/+156
Iu mode has a GMM service request message which a UE in PMM-IDLE mode can use to switch back to PMM-CONNECTED mode.
2016-03-03gprs_gmm: Apply the auth hack only for UTRAN_Iu RAN typeDaniel Willmann1-6/+7
Try to limit the effect 3G support has on the remaining code base. The sgsn test still fails, but at a later test.
2016-03-03gprs_gmm: Fix bit mask when determining update/attach typeDaniel Willmann1-2/+6
Bit 4 is reserved in 3GPP TS 04.08 so exclude it from the type. In 3GPP TS 24.008 it indicates if a follow-on request is pending by the MS, but only in Iu mode. According to the spec it is not required to react to that request with a follow-on proceed so this field can be ignored for now. See 3GPP TS 24.008 Ch. 4.4: "Unless it has specific permission from the network (follow-on proceed) the mobile station side should await the release of the RR connection used for a MM specific procedure before a new MM specific procedure or MM connection establishment is started." as well as Ch. 4.4.4.6: "If the network wishes to prolong the RR connection to allow the mobile station to initiate MM connection establishment (for example if the mobile station has indicated in the LOCATION UPDATING REQUEST that it has a follow-on request pending) the network shall send "follow on proceed" in the LOCATION UPDATING ACCEPT and start timer T3255."
2016-03-03sai arg back to pointerNeels Hofmeyr1-2/+2
2016-03-03tweak ..rcvmsg_iu()'s sai arg.Neels Hofmeyr1-2/+2
It was a uint16_t*, but is passed as a uint16_t, and never used anyway, yet.
2016-03-03iu_common wipNeels Hofmeyr1-1/+2
2016-03-03cosmeticNeels Hofmeyr1-1/+1
2016-03-03WIP: Really ugly hacks to get up to (and including) PDP CTX ACTHarald Welte1-22/+47
2016-03-03WIPHarald Welte1-1/+51
2016-03-03gprs_gmm.c: Preform LLME operations only if we have oneHarald Welte1-5/+7
In case the GMM message did not arrive over a Gb interface, there is no LLME (and thus the associated pointer is NULL). Don't try to perform operations on a NULL LLME.
2016-03-03gprs_gmm.c: Make TLLI handling specific to Gb interfaceHarald Welte1-36/+60
Soem of the operations we perform in the GMM layer are specific to the GPRS/EDGE radio access network and its Gb interface. Let's make them conditional to that in preparation of supporting an Iu interface.
2016-03-03gprs_gmm.c: Don't try to de-reference NULL mmctxHarald Welte1-0/+10
There was a comment in the code that certain GMM messages require a valid mmctx pointer. However, nothing actually checked if that pointer was in fact non-NULL. We plainly crashed if a MS would send us the wrong message in the wrong state.
2016-03-03rename gsm0408_gprs_rcvmsg() to gsm0408_gprs_rcvmsg_gb()Harald Welte1-2/+2
This is the entry point for GMM from Gb. We will create a new one for Iu, so let's be explicit rather than implicit.
2016-03-03prepare sgsn_mm_ctx for Gb and Iu mode (UMTS)Harald Welte1-23/+23
Let's explicitly mark those sgsn_mm_ctx members that apply for Gb mode and (upcoming) Iu mode, respectively.
2016-02-22sgsn: Re-add searching for MM ctx based on TLLI / P-TMSI matchesJacob Erlbeck1-3/+23
If an MM context cannot be found based on BBSGP info and a RA UPDATE REQUEST is received, try to find an MM context with an P-TMSI from which the TLLI could have been derived. This also checks, whether the routing area matches. This is similar to the old behaviour removed by the commits "sgsn: Only look at TLLIs in sgsn_mm_ctx_by_tlli" and "sgsn: Remove tlli_foreign2local", except that this will only be done for RA UPDATE REQUESTs now. Sponsored-by: On-Waves ehf
2016-02-22sgsn: Change handling of missing mmctx in gsm48_rx_gmm_ra_upd_reqJacob Erlbeck1-3/+15
Currently the MM context is just overwritten by a call to sgsn_mm_ctx_by_tlli(msgb_tlli(msg), &old_ra_id) even if it has already been found by using the BSSGP info. With the changes made to sgsn_mm_ctx_by_tlli this will never find a MM context if the routing area has changed. If the routing area has not changed, the mmctx has already been found if it exists. This commit splits searching for an MM context (if it hasn't been found already) from checking, whether a found one can really be used. The actual search is removed, so that the MS will be forced to restart the attach procedure, which is less efficient but safe. Sponsored-by: On-Waves ehf
2016-01-30gsm0408: Provide unique strings for the gsm 04.08 messageHolger Hans Peter Freyther1-18/+18
At Rhizomatica we see that some GSM 04.08 messages are leaked and have no other indication if that is Call Control, SMS or something else.
2015-08-18Use 'ROUTING AREA' consistently, not 'ROUTEING AREA'Harald Welte1-1/+1
The spec unfortuantely uses both terms and has no consistent spelling, but in our logging output we can at least try to be consistent.