aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-05-04debug log tweaks for pagingNeels Hofmeyr3-10/+18
2016-05-04Revert "subscr_paging_dispatch(): use conn->subscr instead of separate param"Neels Hofmeyr1-3/+3
This reverts commit 6f4e83beb05b7e4fd615504a7bf6a71afe15064d, but note: this is not a 1:1 revert since the subscr_paging_sec_cb() semantics have changed. In subscr_paging_dispatch(), the separate subscr parameter is needed in cases where paging expired and there is no conn available. For subscr_paging_sec_cb(), a conn must always be available. Hence it avoids any duplicity by only passing the conn and deriving the subscr from that. Callers of subscr_paging_sec_cb() pass NULL as param, so pass conn->subscr when calling subscr_paging_dispatch() from subscr_paging_sec_cb().
2016-05-02cosmetic: IuCS loggingNeels Hofmeyr4-4/+5
2016-05-02add enum iu_event_type to string conversionNeels Hofmeyr2-0/+15
2016-05-02comments and debug log for paging responseNeels Hofmeyr1-1/+18
2016-05-02msc_paging_request(): remove unused parametersNeels Hofmeyr1-4/+2
The network is known from subscr; the type is not applicable after MSCSPLIT; cbfn and data are obsoleted by explicit subscr_rx_paging_response().
2016-05-02msc_paging_request(): make staticNeels Hofmeyr1-1/+1
it is never called outside of gsm_subscriber.c
2016-05-02msc: paging: use gsm_subscriber API to add Integrity Protection for IuCSNeels Hofmeyr1-22/+1
During peliminary paging response testing, I introduced some code duplication. Remove that and instead call the code that was there before 63b99ced83773d923 ("add preliminary paging response handling, incomplete"). By calling the gsm_subscriber API, the connection is also secured and hence Integrity Protection is enabled for IuCS.
2016-05-02cosmetic: msc: handle_paging_resp() tweaksNeels Hofmeyr1-7/+7
Tweak debug logging, use paging category DPAG. Change the order of arguments to make more sense in the causal relationship.
2016-05-02paging: actually verify subscriber authorizationNeels Hofmeyr1-1/+8
Before this, any paging response would be accepted by the CN, without checking the database whether the subscriber is in fact authorized. The probability that a subscriber would be able to take unauthorized action is slim, nevertheless checking authorization status with the database should happen before we accept a connection.
2016-05-02paging: change subscr_paging_cb() into subscr_rx_paging_response()Neels Hofmeyr2-10/+7
Remove one layer of callback indirection in paging. When a paging response arrives, we always want to first secure the connection, thus a fixed subscr_rx_paging_response() function is more appropriate and avoids having to store a cbfn. The actual actions to be taken upon successful paging are of course still in callback functions stored with each subscriber.
2016-05-02Allow paging even though is_paging is falseNeels Hofmeyr1-2/+5
It doesn't really hurt to see whether we have paging responses queued for a given subscriber. Possibly a subscriber replied with a paging response later than we assumed the paging to be valid.
2016-05-02cosmetic: subscr_paging_dispatch() comments/indentNeels Hofmeyr1-9/+0
2016-05-02subscr_paging_dispatch(): use conn->subscr instead of separate paramNeels Hofmeyr1-3/+3
2016-05-02cosmetic: subscr_paging_dispatch() comments/indentNeels Hofmeyr1-7/+2
2016-05-02add comments on MSCSPLIT and pagingNeels Hofmeyr4-0/+12
2016-05-02gsm_04_08 mscsplit: subscr_request_channel() -> subscr_request_conn()Neels Hofmeyr5-9/+8
Rename subscr_request_channel() to _conn() and remove the channel_type arg. The "channel" is a term from closely tied MSC+BSC code, after separation we shall call it a "connection", i.e. over IuCS or A. The channel_type arg is already unused from a previous MSCSPLIT commit.
2016-05-02gsm_04_08: factor out subscr authorization checkNeels Hofmeyr3-27/+36
Add function subscr_authorized(), absorbing the guts of static authorize_subscriber() from gsm_04_08.c, except the parts specific to Location Updating. subscr_authorized() is a check that is to be added to validation of a paging response.
2016-05-02cscn: (re-)add SMPP initializationNeels Hofmeyr1-7/+9
Remove legacy code from the original NITB version -- the SMPP init functions have since been refactored in 1b0e5540dba697c9cf213e4f0aebc4baaf1618cb. Add SMPP initialization in the refactored version: call the alloc_init before reading config file, and call start with the global network struct after config is read.
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-01iu_rab_act_ps: Use GGSN-side TEI in RAB Assignment RequesetHarald Welte1-3/+3
When we send the RAB Assignment Request to the RNC, we need to tell it the GGSN-side TEI for data, not "our" (SGSN side) TEID. In the RAB-Assignment.req we inform the RNC of the TEID on the GGSN side, and in the RAB-Assignment.resp the RNC informs us of the TEID on the RNC side.
2016-05-01Identify PDP context by RAB ID, not TEIHarald Welte3-22/+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-01libiu: Fix missing break statements in switch in cn_ranap_handle_co()Harald Welte1-0/+2
2016-05-01SGSN: Use PDP Context NSAPI as RAB IDHarald Welte4-16/+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-05-01Fix parsing of auto-generated config fileHarald Welte1-1/+1
When starting with empty config file, saving it by 'write file', and then re-starting osmo-cscn, it would complain: Error occurred during reading below line: long name Osmocom Circuit-Switched Core Network The problem is that the vty parser is configured to expect a single token and not a list of tokens here, but we initialize the default value with multiple words (which are treated as separate token).
2016-04-27debug log for paging: add/tweakNeels Hofmeyr1-5/+2
2016-04-25RAB: add debug log for PS RAB assignmentNeels Hofmeyr1-0/+4
2016-04-25RAB parameters: apply use_x213_nsap parameter additionNeels Hofmeyr4-5/+8
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-25paging_signal_data: remove unused lac memberNeels Hofmeyr2-2/+0
2016-04-25paging response: remove extraneous null check, assert conn and msg further upNeels Hofmeyr1-1/+4
In handle_paging_response(), don't check conn against NULL after using it all the time anyway. To ensure beyond doubt that it is actually never NULL, assert conn further up in the call stack, i.e. in gsm0408_dispatch(), the main entry point for receiving data from the BSC/RNC level. Also assert msg while at it. Fixes: CID#93769
2016-04-20add preliminary paging response handling, incompleteNeels Hofmeyr3-19/+59
In gsm_04_08.c, add a static handle_paging_resp() to take over from the libbsc function gsm48_handle_paging_resp(). Use the subscr->requests listing to handle a Paging Response and call the pending cbfn. In NITB, this used to be done via BTS, and I haven't entirely resolved yet how exactly to rewire this in standalone libmsc. So far, this "works for me", but is worth another visit. Still missing: enable Integrity Protection.
2016-04-20gsm_04_08.c: fix security mode cmd: use auth tuple from MM authNeels Hofmeyr1-12/+2
2016-04-20cosmetic: auth tuple memcpy: rather use target's sizeof()Neels Hofmeyr2-6/+6
2016-04-20tweak tmp_rand[] type to avoid compiler warningsNeels Hofmeyr2-4/+4
2016-04-20gprs_gmm.c: include openssl/rand.h against RAND_bytes() compiler warningNeels Hofmeyr1-0/+2
2016-04-20IuCS auth: generate auth tuples, factor outNeels Hofmeyr1-11/+32
Factor out hardcoded-Ki and auth tuple creation into a static function. Add generation of fresh random bytes and generate a valid auth tuple so that the authentication token is different for every MM Auth.
2016-04-20cscn: enable SMS queue (by removing an '#if 0')Neels Hofmeyr1-2/+0
2016-04-20cscn: enable 'subscriber' vty commands for libmscNeels Hofmeyr2-1/+1
This involves removing the openbsc_vty_print_statistics() from vty_interface_layer3.c, as this would link across the MSC/BSC border.
2016-04-20cn_ranap_handle_co: add error rc and logging for PR OutcomeNeels Hofmeyr1-0/+5
2016-04-20cosmetic: debug and error logging, comment tweaksNeels Hofmeyr5-4/+38
2016-04-20cscn: don't redefine talloc_asn1_ctx from iu.cNeels Hofmeyr1-2/+0
2016-04-20IuCS: more detailed debug log upon IuCS rxNeels Hofmeyr1-2/+9
2016-04-20Add Iu pagingNeels Hofmeyr4-3/+104
Add iu_page_cs() and iu_page_ps() API, also add to libiudummy for linking in tests. Implement msc_paging_request() by calling iu_page_cs().
2016-04-20iu.c: add registry of RNC-Ids in LACsNeels Hofmeyr3-2/+130
Introduce struct gsm_rnc, stored in a global list, static to iu.c. (This list is not part of gsm_network so that the code can be used from both MSC and GPRS code, i.e. both for CS and PS.) Parse RANAP Global RNC Id, add GSM flags to build for gsm48_mcc_mnc_from_bcd() to decode the PLMN Id. Upon every Initial UE message, record/verify RNC Id and LAC for that connection. In case of mismatch, so far just log an error.
2016-04-19iu.c: introduce talloc_iu_ctxNeels Hofmeyr1-3/+6
Introduce talloc_iu_ctx, setup during iu_init() as child of the talloc_ctx passed in by the caller. Allocate ue_conn_ctx from talloc_iu_ctx, used to be from NULL. Allocate osmo_sua_user and talloc_asn1_ctx from talloc_iu_ctx, used to be from the ctx passed in by iu_init() caller.
2016-04-19cosmetic: comment, whitespaceNeels Hofmeyr2-3/+2
2016-04-19iu.h: add iu_link_del()Neels Hofmeyr2-0/+17
2016-04-19Iu RANAP event: add IU_EVENT_LINK_INVALIDATEDNeels Hofmeyr3-3/+8
See in-code comment...
2016-04-19libmsc: Pass KeyStatus to iu_tx_sec_mode_cmdDaniel Willmann1-1/+1