aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
AgeCommit message (Collapse)AuthorFilesLines
2016-05-09Merge branch 'master' into sysmocom/iu, with tweakssysmocom/iu_orig_historyNeels Hofmeyr18-813/+171
Numerous manual adjustments are included to make sense on the sysmocom/iu branch: * gsm_04_08_gprs.h has moved to libosmocore on the master branch, but sysmocom/iu has added some entries. Until it is clear whether to move the additions to libosmocore as well, keep gsm_04_08_gprs.h on sysmocom/iu with merely the additions. * Thus, keep using the old gsm_04_08_gprs.[hc] from openbsc in the Makefiles, but only where the sysmocom/iu additions are needed. * In openbsc's gsm_04_08_gprs.h, * include the libosmocore gsm_04_08_gprs.h, * use '#pragma once' instead of #ifndef and * add a TODO comment about moving the rest to libosmocore. * Apply the addition of an osmo_auth_vector to gsm_auth_tuple: in the Iu auth vector hacks, use the gsm_auth_tuple.vec instead of a local struct. See iu_hack__get_hardcoded_auth_tuple() and gsm48_rx_gmm_att_req(). * In the si2q tests, pass NULL as ctx to gsm_network_init(). * In cscn_main.c, add a debug log that was originally added to osmo-nitb. * openbsc/.gitignore: keep only one addition of 'writtenconfig' Conflicts: openbsc/include/openbsc/gprs_sgsn.h openbsc/include/openbsc/gsm_04_08_gprs.h openbsc/src/gprs/gsm_04_08_gprs.c openbsc/src/libmsc/gsm_04_08.c openbsc/src/osmo-cscn/cscn_main.c openbsc/tests/gsm0408/Makefile.am
2016-05-05Add human-readable name of SGSN_AUTH_AUTHENTICATEHarald Welte1-0/+1
In commit 4adb136da63a1d3ed523ad85e12fd99fc62f5701 we introduced a new authentication state SGSN_AUTH_AUTHENTICATE, but we didn't add that to auth_state_names[] resulting in log messages printing it abut 'unknown 0x1' rather than something more useful.
2016-05-05sgsn/GSUP: Support MAP-style nested LU/ISDHarald Welte1-0/+22
The existing GSUP code expected the subscriber data to be piggy-backed onto the location update response, rather than a separate (and nested) insert subscriber data request/response phase. With this patch we should now support both the nested as well as the piggy-backed version.
2016-05-04gprs: Update mm_ctx ra_id from ue_ctxDaniel Willmann1-0/+5
2016-05-04gprs: Track PMM statesDaniel Willmann2-2/+9
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-01Support raw IPv4 address in RAB Assignment ResponseHarald Welte1-1/+19
There are different Iu dialects in terms of encoding the transport layer address inside RAB Assignment req + resp. Let's be liberal in what we accept, and simply use the length as an indicator of the format. Wireshark uses similar heuristics.
2016-05-01RAB Assignment Response: Handle TEID changesHarald Welte1-2/+16
When the RNC confirms the RAB Assignment, it can each time indicate a new TEID for the GTP-U endpoint on the RNC side. We need to update our information about the PDP context and include that in the UPDATE PDP CONTEXT that we're sending towards the GGSN. This is similar to updating the RNC-side IP address of the GTP endpoint.
2016-05-01Identify PDP context by RAB ID, not TEIHarald Welte2-19/+2
When receiving an RAB-Assignment response from the RNC, we should use the RAB ID (=NSAPI) to resolve the PDP context. We cannot use the TEID, as the TEID chosen by the RNC for this RAB has no relationship to the TEID we were using for the RAB-Assignment request. TEIDs are local to each of the peer, like UDP port numbers.
2016-05-01SGSN: Use PDP Context NSAPI as RAB IDHarald Welte3-14/+2
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-29osmo_oap_decode(): Use common argument orderingHarald Welte2-3/+3
In general, if a function generates output data like a msgb (or in this case filling an osmo_oap_message structure), the output argument precedes the source. This is what we use all over libosmo*, and it is modelled after memcpy(), where dst is the first argument, before src. Let's align osmo_oap_decode(). Intestingly, osmo_oap_encode was already correct, so the encode/decode functions used different conventions before.
2016-04-29OAP: Various coding style fixesHarald Welte1-13/+14
* we always declare stack variables at the top of the function / block * 'switch' is not a function, so there's space ahead of the opening (
2016-04-29OAP: use osmo_oap_ prefix for OAP, rather than plain oap_Harald Welte2-10/+10
this is in preparation of moving related code to libosmocore.
2016-04-29oap_message.h: Remove dependency to openbsc includeHarald Welte2-1/+2
This is a first step to moving oap_messages.h to libosmocore
2016-04-29Move osmo_gsup_messages.[ch] to libosmocoreHarald Welte3-474/+2
This requires the corresponding commit in libosmocore.
2016-04-29move utils.h functions to libosmocoreHarald Welte2-6/+7
This needs the corresponding commit in libosmocore which imports the related functions
2016-04-29osmo_gsup_messge.[ch] documentation update (doxygen)Harald Welte1-0/+10
2016-04-29gsup_messages: Add UMTS AKA related encoding/decoding supportHarald Welte1-0/+46
2016-04-29move osmo_shift_* / osmo_match_shift_* to libosmogsmHarald Welte2-174/+0
2016-04-29rename gprs_shift_*() to osmo_shift_*()Harald Welte4-47/+86
This rename is the first step of moving the associated functions into libosmocore. Also, rename gprs_match_* to osmo_match_shift_* to indicate that it is not just matching the TLV, but also shifting the data portion.
2016-04-29Rename gprs_gsup_* to osmo_gsup_*Harald Welte3-108/+108
This is a preparation to move the related code to libosmocore, whilst at the same time generalizing it from GPRS Subscriber Update Protocol to the Osmocom Generic Subscriber Update Protoco.
2016-04-29use new libosmocore gsm_23_003.h for IMEI/IMSI lengthHarald Welte3-3/+5
... rather than our private definitions everwhere. As an added benefit, gprs_gsup_messages.h is now free of any header dependencies within openbsc.
2016-04-29move gsm_04_08_gprs.h to libosmocoreHarald Welte13-152/+10
This requres the corresponding commit in libosmocore.
2016-04-29Start to use struct osmo_auth_vector from gsm_auth_tupleHarald Welte4-40/+40
Rather than having a 'private' structure for kc, sres and rand, we now finally (with 4 years delay) use osmo_auth_vector from libosmogsm, which encapsulates authentication vectors that can be either GSM triplets or UMTS quintuples or a combination of both. gsm_auth_tuple becomes a wrapper around osmo_auth_vector, adding use_count and key_seq to it. key_seq is no longer initialized inside gprs_gsup_messages.c, as there is no CKSN / key_seq inside the message anyway. If a usre of the code needs key_seq, they need to manage it themselves.
2016-04-25RAB parameters: apply use_x213_nsap parameter additionNeels Hofmeyr2-2/+2
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 Willmann2-30/+7
2016-04-16gtphub_unmap_header_tei(): don't dereference unmapped_tei arg if not present ↵Neels Hofmeyr1-4/+6
(CID #57687)
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-08sgsn: Don't send the pdp context accept every time the RAB activatesDaniel Willmann1-1/+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 Willmann3-9/+27
2016-04-08sgsn: Pass RAB ID to iu_rab_act_ps() functionDaniel Willmann2-2/+2
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-22fix various compiler warningsNeels Hofmeyr1-0/+2
sgsn_libgtp.c: missing include, for asn1str_to_u32() iu_cs.c: missing include, for subscr_name() osmo_bsc_vty.c: int/pointer conversions (note: this was discussed on the list to be solved by passing a pointer instead. Until then...) iudummy.c: opaque struct declarations
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 Hofmeyr2-2/+2
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 Willmann2-29/+37
2016-03-16libiu: Replace RAB assignment response callback with a general oneDaniel Willmann2-4/+29
The new iu event callback will now be called for RAB assignment response, IU release and security mode complete
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 Hofmeyr3-6/+13
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.